| Catalyst::Plugin::Cache::FileCache - File cache |
Catalyst::Plugin::Cache::FileCache - File cache
use Catalyst qw[Cache::FileCache];
MyApp->config->{cache}->{storage} = '/tmp';
MyApp->config->{cache}->{expires} = 3600;
my $data;
unless ( $data = $c->cache->get('data') ) {
$data = MyApp::Model::Data->retrieve('data');
$c->cache->set( 'data', $data );
}
$c->response->body($data);
Extends base class with a file cache.
Returns an instance of Cache::FileCache
the Cache::FileCache manpage, Catalyst.
Christian Hansen, ch@ngmedia.com
Sebastian Riedel sri@oook.de
This library is free software . You can redistribute it and/or modify it under the same terms as perl itself.
| Catalyst::Plugin::Cache::FileCache - File cache |