summaryrefslogtreecommitdiffstats
path: root/Bugzilla.pm
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2017-04-28 21:58:27 +0200
committerDylan William Hardison <dylan@hardison.net>2017-04-28 23:10:58 +0200
commit20938c2a5dcac6a0851b8f81560790ad227ac29d (patch)
tree7fd98aabb42ce257dd8bee2ebf71b052ed2b28ad /Bugzilla.pm
parentb9c748cb794ab41424db260d3048ba877f547803 (diff)
downloadbugzilla-20938c2a5dcac6a0851b8f81560790ad227ac29d.tar.gz
bugzilla-20938c2a5dcac6a0851b8f81560790ad227ac29d.tar.xz
Bug 1360675 - Bugzilla->clear_request_cache: add option to preserve some keys in the request cache
Diffstat (limited to 'Bugzilla.pm')
-rw-r--r--Bugzilla.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/Bugzilla.pm b/Bugzilla.pm
index 1f8d9d800..d84815ff0 100644
--- a/Bugzilla.pm
+++ b/Bugzilla.pm
@@ -710,7 +710,11 @@ sub audit {
use constant request_cache => Bugzilla::Install::Util::_cache();
sub clear_request_cache {
- %{ request_cache() } = ();
+ my ($class, %option) = @_;
+ my $request_cache = request_cache();
+ my @except = $option{except} ? @{ $option{except} } : ();
+
+ %{ $request_cache } = map { $_ => $request_cache->{$_} } @except;
}
# This is a per-process cache. Under mod_cgi it's identical to the