Bug 16758 - Caching issues in scripts running in daemon mode
authorJacek Ablewicz <abl@biblos.pk.edu.pl>
Wed, 14 Sep 2016 13:33:07 +0000 (15:33 +0200)
committerKatrin Fischer <katrin.fischer.83@web.de>
Sun, 14 May 2017 09:48:07 +0000 (11:48 +0200)
commit14dcc522f6a00af02151715c1136fff31862254b
tree0d74a3722acc41716a19679e0001b7e50d8e06dd
parentff789838732302ad3ed34ac628fb3648bdd0f9b8
Bug 16758 - Caching issues in scripts running in daemon mode

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 upstream L2 cache.

This patch adds ->flush_L1_caches() call in rebuild_zebra.pl
inside daemon mode loop.

To test:

1) apply patch
2) ensure that rebuild_zebra.pl -daemon is still working properly,
without any noticeable performance degradation
3) stop memcached daemon and try to run rebuild_zebra.pl -daemon
again: there should be a warning emitted stating that the script
is running in daemon mode but without recommended caching system

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 84dbc80074b5b1ada05b815cba810e4c5fb10dd2)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
misc/migration_tools/rebuild_zebra.pl