[Catalyst] Caching with DBIx::Class::Cursor::Cached and
	Catalyst::TraitFor::Model::DBIC::Schema::Caching
    woosley. xu. 
    redicaps at gmail.com
       
    Tue Mar 15 03:14:50 GMT 2011
    
    
  
Hi everyone,
    I  configured my application  to use DBIx::Class::Cursor::Cached
following the guide provied by
Catalyst::TraitFor::Model::DBIC::Schema::Caching
Here is my configuration sample
__PACKAGE__->config->{'Plugin::Cache'}{backend} =3D {
    store =3D> "FastMmap",
    share_file =3D> '/tmp/fastmmap',
    cache_size =3D> '50m',
    unlink_on_exit =3D> 1,
};
<Model::DB>
   schema_class SEA::DB
   traits Caching
   <connect_info>
        dsn
        user
        password
   </connect_info>
</Model::DB>
And I set cache time to 60 seconds to view the effect. In
ResultSet/Charge.pm, I have some seach like
 my @result =3D $self->search(
        $search,
        {   select =3D> ['nn', 'ac', {count =3D> 'nsea'}, {sum =3D> 'nsea'}=
],
            as       =3D> [qw/nn ac sea_count total/],
            group_by =3D> [qw/nn/],
            cache_for =3D> 60,
        }
    )->all;
Caching seems to be working, but after waiting for more than 60 hours, the
cache result is still there. I am expecting this cache would be refreshed.
Am I missing something?
Thanks.
-- =
Woosley.Xu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20110315/bf452=
ac3/attachment.htm
    
    
More information about the Catalyst
mailing list