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 | |
parent | 24bdd2d7ec485534761891bd1b0c42f14c11435a (diff) |
Disable conf_cache by default, enable it only when safe to do so
Conflicts:
FS/FS/Conf.pm
-rw-r--r-- | FS/FS/Conf.pm | 5 | ||||
-rw-r--r-- | htetc/handler.pl | 3 |
2 files changed, 7 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 || ()), diff --git a/htetc/handler.pl b/htetc/handler.pl index 3c68e83ed..18108ab11 100644 --- a/htetc/handler.pl +++ b/htetc/handler.pl @@ -6,6 +6,9 @@ use strict; use warnings; use FS::Mason qw( mason_interps ); use FS::Trace; +use FS::Conf; + +$FS::Conf::conf_cache_enabled = 1; # enable FS::Conf caching for performance if ( %%%RT_ENABLED%%% ) { |