Catalyst::Plugin::Cache::Memcached::Fast - Catalyst Plugin for
Cache::Memcached::Fast
use Catalyst qw[Cache::Memcached::Fast];
MyApp->config(
cache => {
servers => [
'127.0.0.1:11211',
'127.0.0.1:11212',
],
namespace => 'MyApp:',
}
);
my $data;
unless ( $data = $c->cache->get('data') ) {
$data = $c->model('MyApp::MyData')->search();
$c->cache->set( 'data', $data );
}
$c->response->body($data);
Extends base class with a distributed cache.
- cache
- Returns an instance of
"Cache::Memcached::Fast"
Cache::Memcached::Fast, Catalyst.
Vasiliy Voloshin, "<vasiliy.voloshin at
gmail.com>"
This library is free software . You can redistribute it and/or modify it under
the same terms as perl itself.