From 6c92612c15b3a62356d09c5719a245e52097afbb Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 1 Oct 2019 15:33:42 +0100 Subject: [PATCH] Bug 13193: (RM revert) Make Memcached usage fork safe This reverts commit f7a5466c52c4821394c5c44e0fc4e9603ef0e6f6. We need the new dependancy packaged first. Signed-off-by: Martin Renvoize --- C4/Installer/PerlDependencies.pm | 7 +------ Koha/Cache.pm | 6 +++--- koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/C4/Installer/PerlDependencies.pm b/C4/Installer/PerlDependencies.pm index a3d4a4d1be..f7244744d9 100644 --- a/C4/Installer/PerlDependencies.pm +++ b/C4/Installer/PerlDependencies.pm @@ -265,12 +265,7 @@ our $PERL_DEPS = { 'Cache::Memcached::Fast' => { 'usage' => 'Caching', 'required' => '0', - 'min_ver' => '0.19' - }, - 'Cache::Memcached::Fast::Safe' => { - 'usage' => 'Caching', - 'required' => '0', - 'min_ver' => '0.06' + 'min_ver' => '0.17' }, 'Cache::FastMmap' => { 'usage' => 'Caching', diff --git a/Koha/Cache.pm b/Koha/Cache.pm index 95d0e6ba1b..cf77257825 100644 --- a/Koha/Cache.pm +++ b/Koha/Cache.pm @@ -87,7 +87,7 @@ sub new { $self->{namespace} .= ":$subnamespace:"; if ( $self->{'default_type'} eq 'memcached' - && can_load( modules => { 'Cache::Memcached::Fast::Safe' => undef } ) + && can_load( modules => { 'Cache::Memcached::Fast' => undef } ) && _initialize_memcached($self, @servers) && defined( $self->{'memcached_cache'} ) ) { @@ -120,9 +120,9 @@ sub _initialize_memcached { . join( ', ', @servers ) . " with " . $self->{'namespace'}; - # Cache::Memcached::Fast::Safe doesn't allow a default expire time to be set + # Cache::Memcached::Fast doesn't allow a default expire time to be set # so we force it on setting. - my $memcached = Cache::Memcached::Fast::Safe->new( + my $memcached = Cache::Memcached::Fast->new( { servers => \@servers, compress_threshold => 10_000, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt index 049c9a1521..38c90b90b9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt @@ -102,7 +102,7 @@ [% CASE # nowhere %] Nowhere Note that the right place to define the memcached config is in your $KOHA_CONF file. Currently you do not have a valid memcached configuration defined. [% END %] - [% IF effective_caching_method != 'Cache::Memcached::Fast::Safe' %] + [% IF effective_caching_method != 'Cache::Memcached::Fast' %] | Effective caching method: [% effective_caching_method | html %] [% END %] -- 2.39.5