config cache issues
By default the configuration cached by the mod_perl2 instance. You can disable cache by setting cache/config=0. You should disable cache only if you have multiple calcms instances running on the same mod_perl2 server with different configuration. The Location of the configuration will be determined by config module now.
This commit is contained in:
@@ -3,6 +3,7 @@ package config;
|
||||
use warnings;
|
||||
use strict;
|
||||
|
||||
use FindBin();
|
||||
use Config::General();
|
||||
|
||||
use base 'Exporter';
|
||||
@@ -19,7 +20,7 @@ sub set {
|
||||
sub get {
|
||||
my $filename = shift;
|
||||
|
||||
return $config if defined $config;;
|
||||
return $config if ( defined $config ) && ( $config->{cache}->{cache_config} == 1 );
|
||||
|
||||
my $configuration = Config::General->new(
|
||||
-ConfigFile => $filename,
|
||||
@@ -29,5 +30,11 @@ sub get {
|
||||
return $config;
|
||||
}
|
||||
|
||||
sub getFromScriptLocation() {
|
||||
FindBin::again();
|
||||
my $configFile = $FindBin::Bin . '/config/config.cgi';
|
||||
return config::get($configFile);
|
||||
}
|
||||
|
||||
#do not delete last line
|
||||
1;
|
||||
|
||||
Reference in New Issue
Block a user