14 |
|
|
15 |
=head1 VERSION |
=head1 VERSION |
16 |
|
|
17 |
Version 0.08 |
Version 0.09 |
18 |
|
|
19 |
=cut |
=cut |
20 |
|
|
21 |
our $VERSION = '0.08'; |
our $VERSION = '0.09'; |
22 |
|
|
23 |
=head1 SYNOPSIS |
=head1 SYNOPSIS |
24 |
|
|
169 |
|
|
170 |
$log->logconfess("can't find database name") unless ($database); |
$log->logconfess("can't find database name") unless ($database); |
171 |
|
|
172 |
my $cache_file = "$cache_path/$database/$prefix#$id"; |
my $cache_file = "$cache_path/$database/$prefix/$id"; |
173 |
$cache_file =~ s#//#/#go; |
$cache_file =~ s#//#/#go; |
174 |
|
|
175 |
open(my $fh, '>>', '/tmp/foo'); |
open(my $fh, '>>', '/tmp/foo'); |
176 |
print $fh "LOAD $cache_path / $database / $prefix # $id ==> $cache_file\n"; |
print $fh "LOAD $cache_path / $database / $prefix / $id ==> $cache_file\n"; |
177 |
close($fh); |
close($fh); |
178 |
|
|
179 |
$log->debug("using cache_file $cache_file"); |
$log->debug("using cache_file $cache_file"); |
233 |
|
|
234 |
my $prefix = $arg->{prefix} || ''; |
my $prefix = $arg->{prefix} || ''; |
235 |
|
|
236 |
my $cache_file = $self->{path} . "/$prefix#" . $arg->{id}; |
my $cache_file = $self->{path} . '/' . $prefix . '/'; |
237 |
$cache_file =~ s#//#/#go; |
$cache_file =~ s#//#/#go; |
238 |
|
|
239 |
|
mkpath($cache_file) unless (-d $cache_file); |
240 |
|
|
241 |
|
$cache_file .= $arg->{id}; |
242 |
|
|
243 |
$log->debug("creating storable cache file $cache_file"); |
$log->debug("creating storable cache file $cache_file"); |
244 |
|
|
245 |
return store { |
return store { |