Bugzilla – Attachment 53951 Details for
Bug 16579
[OMNIBUS] Use separate memcached namespace for caching koha-conf.xml
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug XXXXX_3: Update remaining occurrences of ->ismemcached
Bug-XXXXX3-Update-remaining-occurrences-of--ismemc.patch (text/plain), 2.58 KB, created by
Jonathan Druart
on 2016-08-03 14:26:11 UTC
(
hide
)
Description:
Bug XXXXX_3: Update remaining occurrences of ->ismemcached
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-08-03 14:26:11 UTC
Size:
2.58 KB
patch
obsolete
>From f8fcfc119c980ea5347be8feecf8a6797eb26e06 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 23 Jun 2016 06:33:23 +0100 >Subject: [PATCH] Bug XXXXX_3: Update remaining occurrences of ->ismemcached > >TODO: Would be better to provide a better way to know if memcache is correctly set > >https://bugs.koha-community.org/show_bug.cgi?id=16579 >--- > C4/Auth.pm | 3 ++- > Koha/Cache.pm | 2 +- > reports/guided_reports.pl | 3 ++- > 3 files changed, 5 insertions(+), 3 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 985bd39..13aac1b 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -32,6 +32,7 @@ use C4::Languages; > use C4::Branch; # GetBranches > use C4::Search::History; > use Koha; >+use Koha::Caches; > use Koha::AuthUtils qw(hash_password); > use Koha::LibraryCategories; > use Koha::Libraries; >@@ -1725,7 +1726,7 @@ sub get_session { > elsif ( $storage_method eq 'Pg' ) { > $session = new CGI::Session( "driver:PostgreSQL;serializer:yaml;id:md5", $sessionID, { Handle => $dbh } ); > } >- elsif ( $storage_method eq 'memcached' && C4::Context->ismemcached ) { >+ elsif ( $storage_method eq 'memcached' && Koha::Caches->get_instance->memcached_cache ) { > $session = new CGI::Session( "driver:memcached;serializer:yaml;id:md5", $sessionID, { Memcached => C4::Context->memcached } ); > } > else { >diff --git a/Koha/Cache.pm b/Koha/Cache.pm >index d08ad64..42ce50d 100644 >--- a/Koha/Cache.pm >+++ b/Koha/Cache.pm >@@ -88,7 +88,7 @@ sub new { > unless ( $self->{namespace} and @servers ) { > my $koha_config = Koha::Config->read_from_file( Koha::Config->guess_koha_conf() ); > $self->{namespace} ||= $koha_config->{config}{memcached_namespace} || 'koha'; >- @servers ||= split /,/, $koha_config->{config}{memcached_servers}; >+ @servers = split /,/, $koha_config->{config}{memcached_servers} unless @servers; > } > $self->{namespace} .= ":$subnamespace:"; > >diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl >index 75040f4..cc198c8 100755 >--- a/reports/guided_reports.pl >+++ b/reports/guided_reports.pl >@@ -31,6 +31,7 @@ use C4::Debug; > use C4::Koha qw/GetFrameworksLoop/; > use C4::Branch; > use C4::Context; >+use Koha::Caches; > use C4::Log; > use Koha::DateUtils qw/dt_from_string output_pref/; > use Koha::AuthorisedValue; >@@ -47,7 +48,7 @@ Script to control the guided report creation > =cut > > my $input = new CGI; >-my $usecache = C4::Context->ismemcached; >+my $usecache = Koha::Caches->get_instance->memcached_cache; > > my $phase = $input->param('phase') // ''; > my $flagsrequired; >-- >2.8.1
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 16579
:
52705
|
52706
|
52707
|
52708
|
52709
|
52710
|
52711
|
53945
|
53946
|
53947
|
53948
|
53949
|
53950
|
53951
|
53952
|
53953
|
53954
|
53955
|
53956