NAME
Gungho::Component::Cache - Use Cache In Your App
SYNOPSIS
components:
- Cache
cache:
default_backend: small_things
backends:
large_things:
module: '+Cache::Memcached::Managed',
data: '127.0.0.1:11211'
small_things:
module: '+Cache::Memcached::Managed',
data: '127.0.0.1:11212'
DESCRIPTION
This component allows you to setup cache(s) in your crawler application.
To use, simply specify the cache backends that you want to use via cache.backends, and then wherever in your app you can say:
my $cache = $c->cache($name);
METHODS
setup
Setup the cache.
setup_cache_backends
cache($name)
Returns the appropriate cache object from the specified backends.
If you omit $name, then the cache backend specified by the "default_backend" configuration option.
If $name is omitted and no "default_backend" is specified, then this method will croak.