--- trunk/lib/WebPAC/Store.pm 2005/12/06 23:48:11 236 +++ trunk/lib/WebPAC/Store.pm 2005/12/19 20:55:05 299 @@ -14,11 +14,11 @@ =head1 VERSION -Version 0.08 +Version 0.09 =cut -our $VERSION = '0.08'; +our $VERSION = '0.09'; =head1 SYNOPSIS @@ -169,11 +169,11 @@ $log->logconfess("can't find database name") unless ($database); - my $cache_file = "$cache_path/$database/$prefix#$id"; + my $cache_file = "$cache_path/$database/$prefix/$id"; $cache_file =~ s#//#/#go; open(my $fh, '>>', '/tmp/foo'); -print $fh "LOAD $cache_path / $database / $prefix # $id ==> $cache_file\n"; +print $fh "LOAD $cache_path / $database / $prefix / $id ==> $cache_file\n"; close($fh); $log->debug("using cache_file $cache_file"); @@ -233,9 +233,13 @@ my $prefix = $arg->{prefix} || ''; - my $cache_file = $self->{path} . "/$prefix#" . $arg->{id}; + my $cache_file = $self->{path} . '/' . $prefix . '/'; $cache_file =~ s#//#/#go; + mkpath($cache_file) unless (-d $cache_file); + + $cache_file .= $arg->{id}; + $log->debug("creating storable cache file $cache_file"); return store {