From 0f337000630687f4d575f1d17c1956cc7ce2f4d3 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Thu, 19 Apr 2018 00:09:29 +0200 Subject: [PATCH] Bug 20582: Flush memory caches before every request --- Koha/App/Koha.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Koha/App/Koha.pm b/Koha/App/Koha.pm index c3e11d4e91..6e47272a81 100644 --- a/Koha/App/Koha.pm +++ b/Koha/App/Koha.pm @@ -4,6 +4,9 @@ use Modern::Perl; use Mojo::Base 'Mojolicious'; +use Koha::Caches; +use Koha::Cache::Memory::Lite; + sub startup { my ($self) = @_; @@ -51,6 +54,10 @@ sub _before_dispatch { } $c->req->url->parse($url); + + # Flush caches before every request + Koha::Caches->flush_L1_caches(); + Koha::Cache::Memory::Lite->flush(); } 1; -- 2.14.2