Bugzilla – Attachment 49647 Details for
Bug 16044
Define a L1 cache for all objects set in cache
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16044: Populate the L1 cache when L2 is fetched
Bug-16044-Populate-the-L1-cache-when-L2-is-fetched.patch (text/plain), 1.12 KB, created by
Jacek Ablewicz
on 2016-03-29 18:37:09 UTC
(
hide
)
Description:
Bug 16044: Populate the L1 cache when L2 is fetched
Filename:
MIME Type:
Creator:
Jacek Ablewicz
Created:
2016-03-29 18:37:09 UTC
Size:
1.12 KB
patch
obsolete
>From b57865832d10ff06ca2d4c0498c5397a817283d2 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 24 Mar 2016 20:47:47 +0000 >Subject: [PATCH] Bug 16044: Populate the L1 cache when L2 is fetched > >The whole patch set is not very pertinent if the L1 cache is not >populated when L2 is fetched! >This patch fixes this inconsistency. > >Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com> >Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl> >--- > Koha/Cache.pm | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > >diff --git a/Koha/Cache.pm b/Koha/Cache.pm >index d3d52ec..8370d3e 100644 >--- a/Koha/Cache.pm >+++ b/Koha/Cache.pm >@@ -329,7 +329,13 @@ sub get_from_cache { > } > > my $get_sub = $self->{ref($self->{$cache}) . "_get"}; >- return $get_sub ? $get_sub->($key) : $self->{$cache}->get($key); >+ my $value = $get_sub ? $get_sub->($key) : $self->{$cache}->get($key); >+ >+ # Update the L1 cache when fetching the L2 cache >+ # Otherwise the L1 cache won't ever be populated >+ $L1_cache{$key} = $value; >+ >+ return $value; > } > > =head2 clear_from_cache >-- >1.7.10.4
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 16044
:
48968
|
49179
|
49186
|
49187
|
49188
|
49239
|
49240
|
49490
|
49491
|
49492
|
49493
|
49494
|
49545
|
49546
|
49547
|
49548
|
49549
|
49555
|
49568
| 49647