From 4ee27d9f44c03987eaa40a9324b3f4492c3703a0 Mon Sep 17 00:00:00 2001 From: Simon Cozens Date: Mon, 12 Feb 2007 20:44:19 +0000 Subject: [PATCH] So near and yet so far. git-svn-id: http://svn.simon-cozens.org/memories/trunk@28 041978f6-d955-411f-a9d7-1d8545c9c3c7 --- Tagtools.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tagtools.pm b/Tagtools.pm index 10a242b..371c056 100644 --- a/Tagtools.pm +++ b/Tagtools.pm @@ -18,9 +18,9 @@ sub import { *{$whence."::do_cached"} = sub { my ($self, $codeblock,$arg) = @_; my $key = 0+$codeblock; if ($arg) { $key .=":".encode_base64(freeze(\$arg)); } - my $c = $cache->get(0+$codeblock); return @$c if $c; + my $c = $cache->get($key); return @$c if $c; my @stuff = $codeblock->($arg); - $cache->set(0+$codeblock, [ @stuff ]); + $cache->set($key, [ @stuff ]); return @stuff; }; *{$whence."::_tagcloud"} = sub { -- 2.39.5