Bugzilla – Attachment 49161 Details for
Bug 16068
System preference override feature (OVERRIDE_SYSPREF_* = ) is not reliable for some cache systems
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[on top of bug 16044]Bug 16068: Do not cache overridden prefs
on-top-of-bug-16044Bug-16068-Do-not-cache-overridd.patch (text/plain), 1.38 KB, created by
Jonathan Druart
on 2016-03-15 09:43:38 UTC
(
hide
)
Description:
[on top of bug 16044]Bug 16068: Do not cache overridden prefs
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-03-15 09:43:38 UTC
Size:
1.38 KB
patch
obsolete
>From 236c39af26f899ace44d0e8fc543083fa3a7a537 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 15 Mar 2016 09:38:20 +0000 >Subject: [PATCH] [on top of bug 16044]Bug 16068: Do not cache overridden prefs > >These prefs do not need to be cache, a quick access to $ENV permit to >get the value. >--- > C4/Context.pm | 15 +++++++-------- > 1 file changed, 7 insertions(+), 8 deletions(-) > >diff --git a/C4/Context.pm b/C4/Context.pm >index 4c5f508..85c811a 100644 >--- a/C4/Context.pm >+++ b/C4/Context.pm >@@ -512,19 +512,18 @@ sub preference { > > $var = lc $var; > >+ return $ENV{"OVERRIDE_SYSPREF_$var"} >+ if defined $ENV{"OVERRIDE_SYSPREF_$var"}; >+ >+ my $value; > my $cached_var = $use_syspref_cache > ? $syspref_cache->get_from_cache("syspref_$var") > : undef; > return $cached_var if defined $cached_var; > >- my $value; >- if ( defined $ENV{"OVERRIDE_SYSPREF_$var"} ) { >- $value = $ENV{"OVERRIDE_SYSPREF_$var"}; >- } else { >- my $syspref; >- eval { $syspref = Koha::Config::SysPrefs->find( lc $var ) }; >- $value = $syspref ? $syspref->value() : undef; >- } >+ my $syspref; >+ eval { $syspref = Koha::Config::SysPrefs->find( lc $var ) }; >+ my $value = $syspref ? $syspref->value() : undef; > > if ( $use_syspref_cache ) { > $syspref_cache->set_in_cache("syspref_$var", $value); >-- >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 16068
:
49160
|
49161
|
49162
|
49166
|
49167
|
49168
|
49808
|
49813