Bugzilla – Attachment 49166 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]
Bug 16068: Do not cache overridden prefs
Bug-16068-Do-not-cache-overridden-prefs.patch (text/plain), 1.50 KB, created by
Jacek Ablewicz
on 2016-03-15 11:11:12 UTC
(
hide
)
Description:
Bug 16068: Do not cache overridden prefs
Filename:
MIME Type:
Creator:
Jacek Ablewicz
Created:
2016-03-15 11:11:12 UTC
Size:
1.50 KB
patch
obsolete
>From dcce9dbfbc1916a07de82f6eecf98557c133fc6d 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] Bug 16068: Do not cache overridden prefs > >These prefs do not need to be cached, a quick access to $ENV permit to >get the value. > >Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl> >--- > C4/Context.pm | 14 ++++++-------- > 1 file changed, 6 insertions(+), 8 deletions(-) > >diff --git a/C4/Context.pm b/C4/Context.pm >index bae5f12..95cf3e6 100644 >--- a/C4/Context.pm >+++ b/C4/Context.pm >@@ -513,6 +513,9 @@ sub preference { > > $var = lc $var; > >+ return $ENV{"OVERRIDE_SYSPREF_$var"} >+ if defined $ENV{"OVERRIDE_SYSPREF_$var"}; >+ > # Return the value if the var has already been accessed > if ($use_syspref_cache && exists $syspref_L1_cache{$var}) { > return $syspref_L1_cache{$var}; >@@ -523,14 +526,9 @@ sub preference { > : 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); >-- >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 16068
:
49160
|
49161
|
49162
|
49166
|
49167
|
49168
|
49808
|
49813