Bug 20582: Fix a cache issue in Koha::App::{Opac,Intranet}
This was a workaround I wrote when Koha::Caches->flush_L1_caches was not flushing all caches correctly. Now it's not needed and it causes problems, so it must be removed. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
f6a76aae0c
commit
ae0c2b52a2
2 changed files with 2 additions and 22 deletions
|
@ -66,17 +66,7 @@ sub _around_action {
|
|||
my ($next, $c, $action, $last) = @_;
|
||||
|
||||
# Flush memory caches before every request
|
||||
my $caches = $Koha::Caches::singleton_caches;
|
||||
if ($caches) {
|
||||
foreach my $key (keys %$caches) {
|
||||
my $cache = $caches->{$key};
|
||||
if (ref $cache->{cache} eq 'Cache::Memory') {
|
||||
$cache->flush_all;
|
||||
}
|
||||
$cache->flush_L1_cache;
|
||||
}
|
||||
}
|
||||
$Koha::Caches::singleton_caches = {};
|
||||
Koha::Caches->flush_L1_caches();
|
||||
Koha::Cache::Memory::Lite->flush();
|
||||
|
||||
return $next->();
|
||||
|
|
|
@ -66,17 +66,7 @@ sub _around_action {
|
|||
my ($next, $c, $action, $last) = @_;
|
||||
|
||||
# Flush memory caches before every request
|
||||
my $caches = $Koha::Caches::singleton_caches;
|
||||
if ($caches) {
|
||||
foreach my $key (keys %$caches) {
|
||||
my $cache = $caches->{$key};
|
||||
if (ref $cache->{cache} eq 'Cache::Memory') {
|
||||
$cache->flush_all;
|
||||
}
|
||||
$cache->flush_L1_cache;
|
||||
}
|
||||
}
|
||||
$Koha::Caches::singleton_caches = {};
|
||||
Koha::Caches->flush_L1_caches();
|
||||
Koha::Cache::Memory::Lite->flush();
|
||||
|
||||
return $next->();
|
||||
|
|
Loading…
Reference in a new issue