Skip to content

Commit

Permalink
Bug 1302755 - Optimize request_cache() more
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanwh committed Sep 19, 2016
1 parent d10a58f commit eebaaf9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 2 additions & 4 deletions Bugzilla.pm
Original file line number Diff line number Diff line change
Expand Up @@ -651,12 +651,10 @@ sub local_timezone {
||= DateTime::TimeZone->new(name => 'local');
}

my $request_cache = Bugzilla::Install::Util::_cache();

sub request_cache { return $request_cache }
use constant request_cache => Bugzilla::Install::Util::_cache();

sub clear_request_cache {
%$request_cache = ();
%{ request_cache() } = ();
}

# This is a per-process cache. Under mod_cgi it's identical to the
Expand Down
3 changes: 1 addition & 2 deletions Bugzilla/Install/Util.pm
Original file line number Diff line number Diff line change
Expand Up @@ -657,8 +657,7 @@ sub prevent_windows_dialog_boxes {

# This is like request_cache, but it's used only by installation code
# for checksetup.pl and things like that.
my $_cache = {};
sub _cache { return $_cache; }
use constant _cache => {};

###############################
# Copied from Bugzilla::Util #
Expand Down

0 comments on commit eebaaf9

Please sign in to comment.