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

(-)a/C4/Context.pm (-2 / +2 lines)
Lines 401-407 with this method. Link Here
401
401
402
=cut
402
=cut
403
403
404
my $syspref_cache = Koha::Caches->get_instance('syspref');
404
my $syspref_cache;
405
my $use_syspref_cache = 1;
405
my $use_syspref_cache = 1;
406
sub preference {
406
sub preference {
407
    my $self = shift;
407
    my $self = shift;
Lines 413-419 sub preference { Link Here
413
    $var = lc $var;
413
    $var = lc $var;
414
414
415
    if ($use_syspref_cache) {
415
    if ($use_syspref_cache) {
416
        $syspref_cache = Koha::Cache->get_instance() unless $syspref_cache;
416
        $syspref_cache = Koha::Caches->get_instance('syspref') unless $syspref_cache;
417
        my $cached_var = $syspref_cache->get_from_cache("syspref_$var");
417
        my $cached_var = $syspref_cache->get_from_cache("syspref_$var");
418
        return $cached_var if defined $cached_var;
418
        return $cached_var if defined $cached_var;
419
    }
419
    }
(-)a/Koha/Middleware/SetEnv.pm (-11 lines)
Lines 36-43 Koha::Middleware::SetEnv - Plack middleware to allow SetEnv through proxied head Link Here
36
  }
36
  }
37
37
38
38
39
  SetEnv MEMCACHED_NAMESPACE "localhost:11211"
40
  RequestHeader add X-Koha-SetEnv "MEMCACHED_NAMESPACE localhost:11211"
41
39
42
=head1 DESCRIPTION
40
=head1 DESCRIPTION
43
41
Lines 66-73 name. Link Here
66
=cut
64
=cut
67
65
68
my $allowed_setenvs = qr/^(
66
my $allowed_setenvs = qr/^(
69
    MEMCACHED_SERVERS |
70
    MEMCACHED_NAMESPACE |
71
    OVERRIDE_SYSPREF_(\w+) |
67
    OVERRIDE_SYSPREF_(\w+) |
72
    OVERRIDE_SYSPREF_NAMES |
68
    OVERRIDE_SYSPREF_NAMES |
73
    OPAC_CSS_OVERRIDE |
69
    OPAC_CSS_OVERRIDE |
Lines 104-115 sub call { Link Here
104
        %setenvs
100
        %setenvs
105
    };
101
    };
106
102
107
    # We also add the MEMCACHED_ settings to the actual environment, to make sure any early
108
    # initialization of Koha::Cache correctly sets up a memcached connection.
109
    foreach my $special_var ( qw( MEMCACHED_SERVERS MEMCACHED_NAMESPACE ) ) {
110
        $ENV{$special_var} = $setenvs{$special_var} if defined $setenvs{$special_var};
111
    }
112
113
    return $self->app->($env);
103
    return $self->app->($env);
114
}
104
}
115
105
116
- 

Return to bug 16520