From 67a66647ec27e75c7eace9b155f742779b02fa32 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Tue, 11 May 2010 10:09:55 -0700 Subject: [PATCH] CHI requires a switch to keep track of cache size. Also, flush should be mapped to CHI's clear method. Fixes bug #11565. --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/Cache/CHI.pm | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index d7f3c0cef..0744c59af 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -10,6 +10,7 @@ - fixed #11533: Saving entered data at registration - fixed #11564: Shop: Cart does not require a state field in the address - fixed #11562: Missing perl modules in gotcha + - fixed #11565: Can't clear cache on plainblack.com 7.9.4 - We're shipping underscore.js now for its suite of extremely handy utility diff --git a/lib/WebGUI/Cache/CHI.pm b/lib/WebGUI/Cache/CHI.pm index 76cb65d87..3f89e4e5d 100644 --- a/lib/WebGUI/Cache/CHI.pm +++ b/lib/WebGUI/Cache/CHI.pm @@ -59,7 +59,7 @@ Delete the entire cache namespace sub flush { my ( $self ) = @_; - $self->{_chi}->purge; + $self->{_chi}->clear; } #---------------------------------------------------------------------------- @@ -93,7 +93,8 @@ sub new { my $chi; unless ( $chi = $session->stow->get( "CHI" ) ) { my $cacheConf = $session->config->get('cache'); - $cacheConf->{namespace} = $namespace; + $cacheConf->{namespace} = $namespace; + $cacheConf->{is_size_aware} = 1; # Default values my $resolveConf = sub {