companieshouse / MojoX-Plugin-AnyCache

Mojolicious cache plugin
Other
0 stars 3 forks source link

Support multiple caches #4

Open ian-kent opened 10 years ago

ian-kent commented 10 years ago

E.g.

$app->plugin('MojoX::Plugin::AnyCache' => {
    cache_1 => {
        backend => { ... }
    },
    cache_2 => {
        backend => { ... }
    },
});

then make available as one of these:

$self->cache_1->set(foo => 'bar');
$self->cache->cache_1->set(foo => 'bar');