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
|
@ -34,11 +34,12 @@ eval {
|
||||||
my $memcached = {
|
my $memcached = {
|
||||||
servers => [$servers],
|
servers => [$servers],
|
||||||
key_prefix => C4::Context->config('memcached_namespace') || 'koha',
|
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( 'getTranslatedLanguages', memcached => $memcached );
|
||||||
memoize_memcached('getFrameworkLanguages' , memcached => $memcached, expire_time => 600);
|
memoize_memcached( 'getFrameworkLanguages', memcached => $memcached );
|
||||||
memoize_memcached('getAllLanguages', memcached => $memcached, expire_time => 600);
|
memoize_memcached( 'getAllLanguages', memcached => $memcached );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue