Changeset 28
- Timestamp:
- 02/12/07 20:44:19 (2 years ago)
- Files:
-
- trunk/Tagtools.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Tagtools.pm
r26 r28 19 19 my ($self, $codeblock,$arg) = @_; 20 20 my $key = 0+$codeblock; if ($arg) { $key .=":".encode_base64(freeze(\$arg)); } 21 my $c = $cache->get( 0+$codeblock); return @$c if $c;21 my $c = $cache->get($key); return @$c if $c; 22 22 my @stuff = $codeblock->($arg); 23 $cache->set( 0+$codeblock, [ @stuff ]);23 $cache->set($key, [ @stuff ]); 24 24 return @stuff; 25 25 };
