From 891bacef6bb31b13cc7133fa34c417f062af7d2b Mon Sep 17 00:00:00 2001 From: Jesse Weaver Date: Wed, 16 Mar 2016 17:12:15 -0600 Subject: [PATCH] Bug 16140: don't clone cache results for framework/authvals This is needed so as not to cancel out the performance gains of the L1 cache. --- C4/Biblio.pm | 2 +- C4/Koha.pm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index fa1bb4c..3355703 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -1121,7 +1121,7 @@ sub GetMarcStructure { $forlibrarian = $forlibrarian ? 1 : 0; my $cache = Koha::Cache->get_instance(); my $cache_key = "MarcStructure-$forlibrarian-$frameworkcode"; - my $cached = $cache->get_from_cache($cache_key); + my $cached = $cache->get_from_cache( $cache_key, { unsafe => 1 } ); return $cached if $cached; my $sth = $dbh->prepare( diff --git a/C4/Koha.pm b/C4/Koha.pm index 4fda49b..19c9436 100644 --- a/C4/Koha.pm +++ b/C4/Koha.pm @@ -1035,7 +1035,7 @@ sub GetAuthorisedValues { my $cache_key = "AuthorisedValues-$category-$opac-$branch_limit"; my $cache = Koha::Cache->get_instance(); - my $result = $cache->get_from_cache($cache_key); + my $result = $cache->get_from_cache($cache_key, { unsafe => 1 } ); if ($result) { _AddSelectedAuthVal( $result, $selected ) if defined $selected; return $result; @@ -1080,7 +1080,7 @@ sub GetAuthorisedValues { } $sth->finish; - $cache->set_in_cache( $cache_key, \@results, { deepcopy => 1 } ); + $cache->set_in_cache( $cache_key, \@results ); _AddSelectedAuthVal( \@results, $selected ); return \@results; } -- 2.7.0