From b28ffc4944a1ee8205369ae716efeb324231d4fe 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 Content-Type: text/plain; charset="UTF-8" Signed-off-by: Jared Camins-Esakov --- C4/Languages.pm | 17 +++++++++-------- 1 files changed, 9 insertions(+), 8 deletions(-) diff --git a/C4/Languages.pm b/C4/Languages.pm index 091d3bb..ac5ea55 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 ); } }; -- 1.7.2.5