From efd26a44d5640555f7c1a97e782e3661af7d77f0 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Fri, 3 Feb 2012 12:44:17 +1300 Subject: [PATCH] Bug 7432 : Fixing caching for C4::Languages Signed-off-by: Jared Camins-Esakov Signed-off-by: Paul Poulain --- C4/Languages.pm | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/C4/Languages.pm b/C4/Languages.pm index 091d3bb0ed..ac5ea551f8 100644 --- a/C4/Languages.pm +++ b/C4/Languages.pm @@ -30,15 +30,16 @@ eval { if ($servers) { require Memoize::Memcached; import Memoize::Memcached qw(memoize_memcached); - - my $memcached = { - servers => [ $servers ], - key_prefix => C4::Context->config('memcached_namespace') || 'koha', - }; - memoize_memcached('getTranslatedLanguages', memcached => $memcached, expire_time => 600); #cache for 10 minutes - memoize_memcached('getFrameworkLanguages' , memcached => $memcached, expire_time => 600); - memoize_memcached('getAllLanguages', memcached => $memcached, expire_time => 600); + my $memcached = { + servers => [$servers], + key_prefix => C4::Context->config('memcached_namespace') || 'koha', + expire_time => 600 + }; # cache for 10 mins + + memoize_memcached( 'getTranslatedLanguages', memcached => $memcached ); + memoize_memcached( 'getFrameworkLanguages', memcached => $memcached ); + memoize_memcached( 'getAllLanguages', memcached => $memcached ); } }; -- 2.39.5