[Koha-bugs] [Bug 16758] New: Caching issues in scripts running in daemon mode
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Jun 16 18:08:34 CEST 2016
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16758
Bug ID: 16758
Summary: Caching issues in scripts running in daemon mode
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P5 - low
Component: Architecture, internals, and plumbing
Assignee: gmcharlt at gmail.com
Reporter: abl at biblos.pk.edu.pl
QA Contact: testopia at bugs.koha-community.org
As L1 cache does not have expiration mechanism, scripts running in daemon mode
(rebuild_zebra.pl -daemon, sip server ?, ...) would not be aware of any
possible
changes in the data being cached in Koha::Cache.
While adding expiration functionality to Koha::Cache would be pretty simple, I
guess we don't really want to expire things by default after a given amount of
seconds, that would not be good for overall performance; default expiration
time for L2 = memcached is infinite (intentionally). Note that it's also
infinite for L2 = Cache::Memory - probably not intentional, more likely that's
because this code
# Default cache time for memory is _always_ short unless it's specially
# defined, to allow it to work reliably in a persistent environment.
my $cache = Cache::Memory->new(
'namespace' => $self->{'namespace'},
'default_expires' => "$self->{'timeout'} sec" || "10 sec",
);
doesn't work as advertised. That might be a problem for plack + Cache::Memory
setups - hopefully nobody uses such weird combos. Anyway, that belongs to the
separate bug report.
I wonder what would be a best approach for solving this issue for perpetually
running scripts? Maybe just adding a function to Koha::Cache which flushes L1
cache (but not more often then each 10 | 20 | 30 seconds), and call it in
rebuild_zebra.pl etc. daemon loop - ?
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list