Bugzilla – Attachment 193510 Details for
Bug 41896
Remove C4::Context from Koha::Cache
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41896: Remove C4::Context from Koha::Cache
97f28e6.patch (text/plain), 1.27 KB, created by
Jonathan Druart
on 2026-02-20 10:25:07 UTC
(
hide
)
Description:
Bug 41896: Remove C4::Context from Koha::Cache
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2026-02-20 10:25:07 UTC
Size:
1.27 KB
patch
obsolete
>From 97f28e674e2047af8c4ccb6f0afa2585f7535c7b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >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 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41896
: 193510