From 318a1913807b5de2a95d412da4235aad0c45acb9 Mon Sep 17 00:00:00 2001 From: Olli-Antti Kivilahti Date: Tue, 24 Oct 2017 16:50:32 +0300 Subject: [PATCH] Bug 19523 - Koha::Cache changes not passed to all plack workers with in-memory caching. REPRODUCE: - $KOHA_CONF shouldn't have any ( @_ ); $CGI::PARAM_UTF8 = 1; - Koha::Caches->flush_L1_caches(); + + my $syspref_cache = Koha::Caches->get_instance('syspref'); + if ($syspref_cache->{'memcached_cache'}) { #When using a shared caching medium, cache invalidations can be communicated between workers. + Koha::Caches->flush_L1_caches(); + } + else { #Without a shared cache medium, workers cannot invalidate cached values in each others memory, if for. ex. a syspref is changed. + Koha::Caches->flush(); #Then we must flush all caches periodically. + } Koha::Cache::Memory::Lite->flush(); return $q; }; -- 2.7.4