From 97f28e674e2047af8c4ccb6f0afa2585f7535c7b Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 20 Feb 2026 11:16:08 +0100 Subject: [PATCH] Bug 41896: Remove C4::Context from Koha::Cache --- Koha/Cache.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Koha/Cache.pm b/Koha/Cache.pm index e89b8c3bd08..05860561a57 100644 --- a/Koha/Cache.pm +++ b/Koha/Cache.pm @@ -45,9 +45,8 @@ use Module::Load::Conditional qw( can_load ); use Sereal::Encoder; use Sereal::Decoder; -use C4::Context; -use Koha::Cache::Object; use Koha::Config; +use Koha::Cache::Object; use base qw(Class::Accessor); @@ -76,8 +75,8 @@ sub new { # Should we continue to support MEMCACHED ENV vars? $self->{'namespace'} ||= $ENV{MEMCACHED_NAMESPACE}; my @servers = split /,/, $ENV{MEMCACHED_SERVERS} || ''; - $self->{namespace} ||= C4::Context->config('memcached_namespace') || 'koha'; - @servers = split /,/, C4::Context->config('memcached_servers') // '' + $self->{namespace} = Koha::Config->get_instance->get('memcached_namespace') || 'koha'; + @servers = split /,/, Koha::Config->get_instance->get('memcached_servers') // '' unless @servers; $self->{namespace} .= ":$subnamespace:"; -- 2.43.0