diff options
author | Dave Lawrence <dlawrence@mozilla.com> | 2012-10-12 00:41:57 +0200 |
---|---|---|
committer | Dave Lawrence <dlawrence@mozilla.com> | 2012-10-12 00:41:57 +0200 |
commit | 3b4065719921c2dc6f620aa5aa17d33c7d6d1c95 (patch) | |
tree | 234fe8a7e9aee10efdc41b1cbc0ae05afc610608 /Bugzilla.pm | |
parent | f9decb719a83f4cc15ef483f032c7cd1c37bce10 (diff) | |
download | bugzilla-3b4065719921c2dc6f620aa5aa17d33c7d6d1c95.tar.gz bugzilla-3b4065719921c2dc6f620aa5aa17d33c7d6d1c95.tar.xz |
Bug 799257 - Backport bug 795650 and bug 797833 to bmo/4.0 and bmo/4.2 for performance improvement
r=glob
Diffstat (limited to 'Bugzilla.pm')
-rw-r--r-- | Bugzilla.pm | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Bugzilla.pm b/Bugzilla.pm index b56f42ec4..b61062a9f 100644 --- a/Bugzilla.pm +++ b/Bugzilla.pm @@ -289,9 +289,7 @@ sub input_params { } sub localconfig { - my $class = shift; - $class->request_cache->{localconfig} ||= read_localconfig(); - return $class->request_cache->{localconfig}; + return $_[0]->process_cache->{localconfig} ||= read_localconfig(); } sub params { @@ -652,6 +650,15 @@ sub request_cache { return $_request_cache; } +# This is a per-process cache. Under mod_cgi it's identical to the +# request_cache. When using mod_perl, items in this cache live until the +# worker process is terminated. +our $_process_cache = {}; + +sub process_cache { + return $_process_cache; +} + # Private methods # Per-process cleanup. Note that this is a plain subroutine, not a method, |