From 390c65c89dac5a8b86c6ea8f00702fcedc1fc2f9 Mon Sep 17 00:00:00 2001 From: Olli-Antti Kivilahti Date: Tue, 24 Oct 2017 16:10:23 +0300 Subject: [PATCH] Bug 18232 - Koha::Cache::flush - Simply flush all caches - Squashable1, fix pesky syspref cache issue After flushing Koha::Caches this flush() also removed the references to the singleton caches, forcing reinstating the cache connection. C4::Context had a hard-coded package variable referencing to the sysprefs cache. After flushing for the first time, the reference to the syspref cache was severed for Koha::Caches, but not to the C4::Context syspref cache, and flushing started to fail because the syspref cache was no longer referenced from Koha::Caches. The original change was made to try to get around the memcached cache expiration issues. And had this unintended side-effect. --- Koha/Caches.pm | 1 - 1 file changed, 1 deletion(-) diff --git a/Koha/Caches.pm b/Koha/Caches.pm index cb3081f..8a2e67e 100644 --- a/Koha/Caches.pm +++ b/Koha/Caches.pm @@ -77,7 +77,6 @@ sub flush { for my $k ( keys %$singleton_caches ) { my $cache = $singleton_caches->{$k}; $cache->flush_all(); - delete $singleton_caches->{$k}; } } -- 2.7.4