@@ -, +, @@ --- debian/templates/plack.psgi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) --- a/debian/templates/plack.psgi +++ a/debian/templates/plack.psgi @@ -46,6 +46,21 @@ use CGI qw(-utf8 ); # we will loose -utf8 under plack, otherwise $CGI::PARAM_UTF8 = 1; Koha::Caches->flush_L1_caches(); Koha::Cache::Memory::Lite->flush(); + + my $conf_fname = Koha::Config->guess_koha_conf; + my $conf_cache = Koha::Caches->get_instance('config'); + if ( $conf_cache->cache ) { + my $last_modification_time_cached = $conf_cache->get_from_cache('last_modification_time'); + my $last_modification_time = qx{stat --format %Y $conf_fname}; + unless ( $last_modification_time_cached ) { + $conf_cache->set_in_cache('last_modification_time', $last_modification_time) + } + elsif ( $last_modification_time > $last_modification_time_cached ) { + $conf_cache->flush_all; + $conf_cache->set_in_cache('last_modification_time', $last_modification_time) + } + } + return $q; }; } --