[Koha-bugs] [Bug 6193] Use memcached cache koha-conf.xml configuration variables
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Jul 7 19:44:39 CEST 2011
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6193
--- Comment #3 from Tomás Cohen Arazi <tomascohen at gmail.com> 2011-07-07 17:44:39 UTC ---
I'd like to state FRT that I find interesting the use of
C4::Context->ismemcached and C4::Context->memcached outside C4::Context, as
1) C4::Context is used everywhere memcached is used
2) It will simplify code in those places:
Biblio.pm:
my $servers = C4::Context->config('memcached_servers');
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( 'GetMarcStructure', memcached => $memcached,
expire_time => 600 ); #cache for 10 minutes
}
To:
if (C4::Context->ismemcached) {
require Memoize::Memcached;
import Memoize::Memcached qw(memoize_memcached);
memoize_memcached( 'GetMarcStructure',
memcached => C4::Context->memcached,
expire_time => 600 ); #cache for 10 minutes
}
--
Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
More information about the Koha-bugs
mailing list