diff options
author | Jason Terry <jterry@bluehost.com> | 2015-02-17 09:50:56 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2015-02-24 18:54:53 -0800 |
commit | 688288d7c60a648519d3b0127cd9286401078204 (patch) | |
tree | ce2edb94486fa2a5adfcbb581746686390cab156 /FS | |
parent | 24bdd2d7ec485534761891bd1b0c42f14c11435a (diff) |
Disable conf_cache by default, enable it only when safe to do so
Conflicts:
FS/FS/Conf.pm
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/Conf.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 855c9f421..e20474743 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -1,7 +1,9 @@ package FS::Conf; use strict; -use vars qw($base_dir @config_items @base_items @card_types $DEBUG $conf_cache); +use vars qw( $base_dir @config_items @base_items @card_types $DEBUG + $conf_cache $conf_cache_enabled + ); use Carp; use IO::File; use File::Basename; @@ -121,6 +123,7 @@ sub _config { my($self,$name,$agentnum,$agentonly)=@_; my $hashref = { 'name' => $name }; local $FS::Record::conf = undef; # XXX evil hack prevents recursion + $conf_cache = undef unless $conf_cache_enabled; # use cache only when it is safe to do so my $cv; my @a = ( ($agentnum || ()), |