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

@ -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;