|
Lines 45-53
use Module::Load::Conditional qw( can_load );
Link Here
|
| 45 |
use Sereal::Encoder; |
45 |
use Sereal::Encoder; |
| 46 |
use Sereal::Decoder; |
46 |
use Sereal::Decoder; |
| 47 |
|
47 |
|
| 48 |
use C4::Context; |
|
|
| 49 |
use Koha::Cache::Object; |
| 50 |
use Koha::Config; |
48 |
use Koha::Config; |
|
|
49 |
use Koha::Cache::Object; |
| 51 |
|
50 |
|
| 52 |
use base qw(Class::Accessor); |
51 |
use base qw(Class::Accessor); |
| 53 |
|
52 |
|
|
Lines 76-83
sub new {
Link Here
|
| 76 |
# Should we continue to support MEMCACHED ENV vars? |
75 |
# Should we continue to support MEMCACHED ENV vars? |
| 77 |
$self->{'namespace'} ||= $ENV{MEMCACHED_NAMESPACE}; |
76 |
$self->{'namespace'} ||= $ENV{MEMCACHED_NAMESPACE}; |
| 78 |
my @servers = split /,/, $ENV{MEMCACHED_SERVERS} || ''; |
77 |
my @servers = split /,/, $ENV{MEMCACHED_SERVERS} || ''; |
| 79 |
$self->{namespace} ||= C4::Context->config('memcached_namespace') || 'koha'; |
78 |
$self->{namespace} = Koha::Config->get_instance->get('memcached_namespace') || 'koha'; |
| 80 |
@servers = split /,/, C4::Context->config('memcached_servers') // '' |
79 |
@servers = split /,/, Koha::Config->get_instance->get('memcached_servers') // '' |
| 81 |
unless @servers; |
80 |
unless @servers; |
| 82 |
$self->{namespace} .= ":$subnamespace:"; |
81 |
$self->{namespace} .= ":$subnamespace:"; |
| 83 |
|
82 |
|
| 84 |
- |
|
|