--- lib/A3C/Cache.pm 2008/06/27 13:27:02 226 +++ lib/A3C/Cache.pm 2008/06/27 17:53:30 227 @@ -4,7 +4,7 @@ use warnings; use base qw(Jifty::Object Class::Accessor::Fast); -__PACKAGE__->mk_accessors( qw(instance) ); +__PACKAGE__->mk_accessors( qw(instance dir) ); use File::Slurp; use JSON::XS; use Carp qw/confess/; @@ -23,7 +23,7 @@ =head2 new - my $cache = A3C::Cache->new({ instance => 'foobar' }); + my $cache = A3C::Cache->new({ instance => 'foobar', dir => 'strix' }); =head2 cache_path @@ -40,7 +40,9 @@ #warn "# cache_path",dump( @_ ); - my $path = Jifty::Util->absolute_path( 'var/strix' ); + my $dir = $self->dir || 'strix'; + + my $path = Jifty::Util->absolute_path( "var/$dir" ); if ( ! -e $path ) { mkdir $path || die "can't create $path: $!";