View | Details | Raw Unified | Return to bug 20582
Collapse All | Expand All

(-)a/Koha/App/Intranet.pm (-11 / +1 lines)
Lines 66-82 sub _around_action { Link Here
66
    my ($next, $c, $action, $last) = @_;
66
    my ($next, $c, $action, $last) = @_;
67
67
68
    # Flush memory caches before every request
68
    # Flush memory caches before every request
69
    my $caches = $Koha::Caches::singleton_caches;
69
    Koha::Caches->flush_L1_caches();
70
    if ($caches) {
71
        foreach my $key (keys %$caches) {
72
            my $cache = $caches->{$key};
73
            if (ref $cache->{cache} eq 'Cache::Memory') {
74
                $cache->flush_all;
75
            }
76
            $cache->flush_L1_cache;
77
        }
78
    }
79
    $Koha::Caches::singleton_caches = {};
80
    Koha::Cache::Memory::Lite->flush();
70
    Koha::Cache::Memory::Lite->flush();
81
71
82
    return $next->();
72
    return $next->();
(-)a/Koha/App/Opac.pm (-12 / +1 lines)
Lines 66-82 sub _around_action { Link Here
66
    my ($next, $c, $action, $last) = @_;
66
    my ($next, $c, $action, $last) = @_;
67
67
68
    # Flush memory caches before every request
68
    # Flush memory caches before every request
69
    my $caches = $Koha::Caches::singleton_caches;
69
    Koha::Caches->flush_L1_caches();
70
    if ($caches) {
71
        foreach my $key (keys %$caches) {
72
            my $cache = $caches->{$key};
73
            if (ref $cache->{cache} eq 'Cache::Memory') {
74
                $cache->flush_all;
75
            }
76
            $cache->flush_L1_cache;
77
        }
78
    }
79
    $Koha::Caches::singleton_caches = {};
80
    Koha::Cache::Memory::Lite->flush();
70
    Koha::Cache::Memory::Lite->flush();
81
71
82
    return $next->();
72
    return $next->();
83
- 

Return to bug 20582