Bugzilla – Attachment 28625 Details for
Bug 9967
Authorized values are not Plack-compatible
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9967 - include $branch_limit in the cache key
Bug-9967---include-branchlimit-in-the-cache-key.patch (text/plain), 1.43 KB, created by
Robin Sheat
on 2014-06-02 22:45:17 UTC
(
hide
)
Description:
Bug 9967 - include $branch_limit in the cache key
Filename:
MIME Type:
Creator:
Robin Sheat
Created:
2014-06-02 22:45:17 UTC
Size:
1.43 KB
patch
obsolete
>From 615afc805a1879f957e087c08764886a10fd8e8e Mon Sep 17 00:00:00 2001 >From: Robin Sheat <robin@catalyst.net.nz> >Date: Tue, 3 Jun 2014 10:41:46 +1200 >Subject: [PATCH] Bug 9967 - include $branch_limit in the cache key > >Make the caching more correct. Also removes a warn that got left behind. >--- > C4/Koha.pm | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > >diff --git a/C4/Koha.pm b/C4/Koha.pm >index 42da37b..471e35a 100644 >--- a/C4/Koha.pm >+++ b/C4/Koha.pm >@@ -1085,16 +1085,16 @@ sub GetAuthorisedValues { > # what it's for. > > # Is this cached already? >- $opac = $opac ? 1 : 0; # normalise to be safe >+ $opac = $opac ? 1 : 0; # normalise to be safe >+ my $branch_limit = >+ C4::Context->userenv ? C4::Context->userenv->{"branch"} : ""; > my $selected_key = defined($selected) ? $selected : ''; >- my $cache_key = "AuthorisedValues-$category-$selected_key-$opac"; >- my $cache = Koha::Cache->get_instance(); >- my $result = $cache->get_from_cache($cache_key); >-warn "fetched $result from cache"; >+ my $cache_key = >+ "AuthorisedValues-$category-$selected_key-$opac-$branch_limit"; >+ my $cache = Koha::Cache->get_instance(); >+ my $result = $cache->get_from_cache($cache_key); > return $result if $result; > >- my $branch_limit = >- C4::Context->userenv ? C4::Context->userenv->{"branch"} : ""; > my @results; > my $dbh = C4::Context->dbh; > my $query = qq{ >-- >1.8.3.2
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 9967
:
26786
|
26910
|
27383
|
28412
|
28625
|
31726
|
32086
|
32087