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

(-)a/C4/Context.pm (-1 / +19 lines)
Lines 249-255 sub new { Link Here
249
    my $conf_cache = Koha::Caches->get_instance('config');
249
    my $conf_cache = Koha::Caches->get_instance('config');
250
    my $config_from_cache;
250
    my $config_from_cache;
251
    if ( $conf_cache->cache ) {
251
    if ( $conf_cache->cache ) {
252
        $self = $conf_cache->get_from_cache('koha_conf');
252
        my $last_modification_time_cached =
253
          $conf_cache->get_from_cache('last_modification_time');
254
        my $last_modification_time = qx{stat --format %Y $conf_fname};
255
256
        #  There must be nothing in cache (or the last modification does not exist yet)
257
        unless ($last_modification_time_cached) {
258
            $conf_cache->set_in_cache( 'last_modification_time',
259
                $last_modification_time );
260
        }
261
        # The config file needs to be reread, it has been changed since the last init of C4::Context
262
        elsif ( $last_modification_time > $last_modification_time_cached ) {
263
            $conf_cache->flush_all;
264
            $conf_cache->set_in_cache( 'last_modification_time',
265
                $last_modification_time );
266
        }
267
        # We can use the data from the cache
268
        else {
269
            $self = $conf_cache->get_from_cache('koha_conf');
270
        }
253
    }
271
    }
254
    unless ( $self and %$self ) {
272
    unless ( $self and %$self ) {
255
        $self = Koha::Config->read_from_file($conf_fname);
273
        $self = Koha::Config->read_from_file($conf_fname);
(-)a/debian/templates/plack.psgi (-1 / +1 lines)
Lines 46-51 use CGI qw(-utf8 ); # we will loose -utf8 under plack, otherwise Link Here
46
        $CGI::PARAM_UTF8 = 1;
46
        $CGI::PARAM_UTF8 = 1;
47
        Koha::Caches->flush_L1_caches();
47
        Koha::Caches->flush_L1_caches();
48
        Koha::Cache::Memory::Lite->flush();
48
        Koha::Cache::Memory::Lite->flush();
49
        C4::Context->new; # Any side effects to expect from this?
49
        return $q;
50
        return $q;
50
    };
51
    };
51
}
52
}
52
- 

Return to bug 22473