Bugzilla – Attachment 49813 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.46 KB, created by
Martin Renvoize
on 2016-04-01 18:54:46 UTC
(
hide
)
Description:
Bug 16068: Do not cache overridden prefs
Filename:
MIME Type:
Creator:
Martin Renvoize
Created:
2016-04-01 18:54:46 UTC
Size:
1.46 KB
patch
obsolete
>From 4e14354f1052dad107e225e29f505f321c709f1d 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> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/Context.pm | 14 ++++++-------- > 1 file changed, 6 insertions(+), 8 deletions(-) > >diff --git a/C4/Context.pm b/C4/Context.pm >index 6b70b60..c80647a 100644 >--- a/C4/Context.pm >+++ b/C4/Context.pm >@@ -520,19 +520,17 @@ sub preference { > > $var = lc $var; > >+ return $ENV{"OVERRIDE_SYSPREF_$var"} >+ if defined $ENV{"OVERRIDE_SYSPREF_$var"}; >+ > 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.1.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