[Koha-bugs] [Bug 16758] Caching issues in scripts running in daemon mode

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Sep 6 09:09:59 CEST 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16758

--- Comment #4 from Jacek Ablewicz <abl at biblos.pk.edu.pl> ---
(In reply to Jonathan Druart from comment #3)
> Something like:
> 
> @@ -242,6 +243,7 @@ my $tester = XML::LibXML->new();
>  if ($daemon_mode) {
>      while (1) {
>          # For incremental updates, skip the update if the updates are locked
> +        Koha::Cache->flush_L1_cache;
>          if (_flock($LockFH, LOCK_EX|LOCK_NB)) {
>              do_one_pass() if ( zebraqueue_not_empty() );
>              _flock($LockFH, LOCK_UN);
> 
> (+ use Koha::Cache)

That should work fine IMO, without significant performance hit (as long as L2
is memcached). Or maybe:

   - do_one_pass() if ( zebraqueue_not_empty() );
   + if ( zebraqueue_not_empty() ) {
   +     Koha::Cache->flush_L1_cache;
   +     do_one_pass();
   + }

would be a bit better (no need to clear the cache at each and every pass if
there is nothing to reindex).

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list