*CGI::new = sub {
my $q = $old_new->( @_ );
$CGI::PARAM_UTF8 = 1;
- C4::Context->clear_syspref_L1_cache();
+ Koha::Caches->flush_L1_caches();
+ Koha::Cache::Memory::Lite->flush();
return $q;
};
}
use C4::Branch;
use C4::Category;
use Koha::DateUtils;
+use Koha::Caches;
+use Koha::Cache::Memory::Lite;
=for preload
use C4::Tags; # FIXME
=cut
my $CGI_ROOT = $ENV{INTRANET} ? $ENV{INTRANETDIR} : $ENV{OPACDIR};
warn "# using Koha ", $ENV{INTRANET} ? 'intranet' : 'OPAC', " CGI from $CGI_ROOT\n";
-my $app=Plack::App::CGIBin->new(root => $CGI_ROOT);
+my $app=Plack::App::CGIBin->new(root => $CGI_ROOT)->to_app;
my $home = sub {
return [ 302, [ Location => '/cgi-bin/koha/' . ( $ENV{INTRANET} ? 'mainpage.pl' : 'opac-main.pl' ) ] ];
};