Bug 7432 : Fixing caching for C4::Languages
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This commit is contained in:
parent
516abc4896
commit
efd26a44d5
1 changed files with 9 additions and 8 deletions
|
@ -32,13 +32,14 @@ eval {
|
|||
import Memoize::Memcached qw(memoize_memcached);
|
||||
|
||||
my $memcached = {
|
||||
servers => [ $servers ],
|
||||
key_prefix => C4::Context->config('memcached_namespace') || 'koha',
|
||||
};
|
||||
servers => [$servers],
|
||||
key_prefix => C4::Context->config('memcached_namespace') || 'koha',
|
||||
expire_time => 600
|
||||
}; # cache for 10 mins
|
||||
|
||||
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);
|
||||
memoize_memcached( 'getTranslatedLanguages', memcached => $memcached );
|
||||
memoize_memcached( 'getFrameworkLanguages', memcached => $memcached );
|
||||
memoize_memcached( 'getAllLanguages', memcached => $memcached );
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue