]> git.decadent.org.uk Git - memories.git/commitdiff
So near and yet so far.
authorSimon Cozens <simon@simon-cozens.org>
Mon, 12 Feb 2007 20:44:19 +0000 (20:44 +0000)
committerSimon Cozens <simon@simon-cozens.org>
Mon, 12 Feb 2007 20:44:19 +0000 (20:44 +0000)
git-svn-id: http://svn.simon-cozens.org/memories/trunk@28 041978f6-d955-411f-a9d7-1d8545c9c3c7

Tagtools.pm

index 10a242be8da1b317d7f7d43cf5ef4768988f922d..371c056bb4a7ed1e4592e38c997bdef02d778621 100644 (file)
@@ -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 {