Bug 41896: Remove C4::Context from Koha::Cache
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Amended-by: Jonathan Druart
Restore ||= op
- $self->{namespace} = Koha::Config->get_instance->get('memcached_namespace') || 'koha';
+ $self->{namespace} ||= Koha::Config->get_instance->get('memcached_namespace') || 'koha';
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
parent
d154cda830
commit
e1072702f8
|
|
@ -45,9 +45,8 @@ use Module::Load::Conditional qw( can_load );
|
||||||
use Sereal::Encoder;
|
use Sereal::Encoder;
|
||||||
use Sereal::Decoder;
|
use Sereal::Decoder;
|
||||||
|
|
||||||
use C4::Context;
|
|
||||||
use Koha::Cache::Object;
|
|
||||||
use Koha::Config;
|
use Koha::Config;
|
||||||
|
use Koha::Cache::Object;
|
||||||
|
|
||||||
use base qw(Class::Accessor);
|
use base qw(Class::Accessor);
|
||||||
|
|
||||||
|
|
@ -76,8 +75,8 @@ sub new {
|
||||||
# Should we continue to support MEMCACHED ENV vars?
|
# Should we continue to support MEMCACHED ENV vars?
|
||||||
$self->{'namespace'} ||= $ENV{MEMCACHED_NAMESPACE};
|
$self->{'namespace'} ||= $ENV{MEMCACHED_NAMESPACE};
|
||||||
my @servers = split /,/, $ENV{MEMCACHED_SERVERS} || '';
|
my @servers = split /,/, $ENV{MEMCACHED_SERVERS} || '';
|
||||||
$self->{namespace} ||= C4::Context->config('memcached_namespace') || 'koha';
|
$self->{namespace} ||= Koha::Config->get_instance->get('memcached_namespace') || 'koha';
|
||||||
@servers = split /,/, C4::Context->config('memcached_servers') // ''
|
@servers = split /,/, Koha::Config->get_instance->get('memcached_servers') // ''
|
||||||
unless @servers;
|
unless @servers;
|
||||||
$self->{namespace} .= ":$subnamespace:";
|
$self->{namespace} .= ":$subnamespace:";
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue