From 496ddccead787a78c88aef90467fb8f7d141e7c7 Mon Sep 17 00:00:00 2001 From: dakkar Date: Sat, 8 Sep 2007 10:50:54 +0000 Subject: cache is now updated on 'put' git-svn-id: svn://luxion/repos/WebCoso/trunk@283 fcb26f47-9200-0410-b104-b98ab5b095f3 --- lib/File/Cache/Parsed.pm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib') diff --git a/lib/File/Cache/Parsed.pm b/lib/File/Cache/Parsed.pm index 7792cf1..1546ef1 100644 --- a/lib/File/Cache/Parsed.pm +++ b/lib/File/Cache/Parsed.pm @@ -76,9 +76,11 @@ sub put { my $ww=first {$filename =~ m{$_->[0]}} @{$self->{writers}}; if ($ww) { + $self->{cache}{$filename}=$contents; return $ww->[1]->($filename,$contents); } elsif (!ref($contents)) { + $self->{cache}{$filename}=$contents; return print {file($filename)->openw} $contents; } else { -- cgit v1.2.3