Bugzilla – Attachment 49488 Details for
Bug 16140
Only clear L1 cache when needed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16140: don't clone cache results for framework/authvals
Bug-16140-dont-clone-cache-results-for-frameworkau.patch (text/plain), 1.68 KB, created by
Jesse Weaver
on 2016-03-23 22:55:56 UTC
(
hide
)
Description:
Bug 16140: don't clone cache results for framework/authvals
Filename:
MIME Type:
Creator:
Jesse Weaver
Created:
2016-03-23 22:55:56 UTC
Size:
1.68 KB
patch
obsolete
>From 891bacef6bb31b13cc7133fa34c417f062af7d2b Mon Sep 17 00:00:00 2001 >From: Jesse Weaver <jweaver@bywatersolutions.com> >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
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 16140
:
49487
|
49488
|
49589
|
49590
|
51024
|
51025
|
51026