Make a safe copy of the config file before modifying it. Fixes bug #12322.

This commit is contained in:
Colin Kuskie 2012-02-04 14:52:16 -08:00
parent 78159c9795
commit 2dbd38f519
2 changed files with 3 additions and 1 deletions

View file

@ -1,5 +1,6 @@
7.10.25
- fixed #12321: Error while deleting a group.
- fixed #12322: Cache/CHI stomps on the config file
7.10.24
- fixed #12318: asset error causes asset manager to fail

View file

@ -3,6 +3,7 @@ package WebGUI::Cache::CHI;
use strict;
use base 'WebGUI::Cache';
use File::Temp qw/tempdir/;
use clone qw/clone/;
use CHI;
=head1 NAME
@ -92,7 +93,7 @@ sub new {
# Create CHI object from config
my $chi;
unless ( $chi = $session->stow->get( "CHI" ) ) {
my $cacheConf = $session->config->get('cache');
my $cacheConf = clone $session->config->get('cache');
$cacheConf->{namespace} = $namespace;
$cacheConf->{is_size_aware} = 1;