From ede05f0fdb7ad40b75a053a39100aa4e4d617205 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Thu, 13 Oct 2016 08:35:24 +0000 Subject: [PATCH] Bug 16520 (Follow up) Rebase fixes --- C4/Context.pm | 4 ++-- Koha/Middleware/SetEnv.pm | 10 ---------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/C4/Context.pm b/C4/Context.pm index 1866b1d..c9d9617 100644 --- a/C4/Context.pm +++ b/C4/Context.pm @@ -401,7 +401,7 @@ with this method. =cut -my $syspref_cache = Koha::Caches->get_instance('syspref'); +my $syspref_cache; my $use_syspref_cache = 1; sub preference { my $self = shift; @@ -413,7 +413,7 @@ sub preference { $var = lc $var; if ($use_syspref_cache) { - $syspref_cache = Koha::Cache->get_instance() unless $syspref_cache; + $syspref_cache = Koha::Caches->get_instance('syspref') unless $syspref_cache; my $cached_var = $syspref_cache->get_from_cache("syspref_$var"); return $cached_var if defined $cached_var; } diff --git a/Koha/Middleware/SetEnv.pm b/Koha/Middleware/SetEnv.pm index 6cf334d..541040d 100644 --- a/Koha/Middleware/SetEnv.pm +++ b/Koha/Middleware/SetEnv.pm @@ -36,8 +36,6 @@ Koha::Middleware::SetEnv - Plack middleware to allow SetEnv through proxied head } - SetEnv MEMCACHED_NAMESPACE "localhost:11211" - RequestHeader add X-Koha-SetEnv "MEMCACHED_NAMESPACE localhost:11211" =head1 DESCRIPTION @@ -66,8 +64,6 @@ name. =cut my $allowed_setenvs = qr/^( - MEMCACHED_SERVERS | - MEMCACHED_NAMESPACE | OVERRIDE_SYSPREF_(\w+) | OVERRIDE_SYSPREF_NAMES | OPAC_CSS_OVERRIDE | @@ -104,12 +100,6 @@ sub call { %setenvs }; - # We also add the MEMCACHED_ settings to the actual environment, to make sure any early - # initialization of Koha::Cache correctly sets up a memcached connection. - foreach my $special_var ( qw( MEMCACHED_SERVERS MEMCACHED_NAMESPACE ) ) { - $ENV{$special_var} = $setenvs{$special_var} if defined $setenvs{$special_var}; - } - return $self->app->($env); } -- 2.1.4