use strict;
use warnings;
-use Test::More 'no_plan';
+use Test::More;
-use ok "Catalyst::Plugin::Cache";
-use ok "Catalyst::Plugin::Cache::Choose::KeyRegexes";
+use_ok "Catalyst::Plugin::Cache";
+use_ok "Catalyst::Plugin::Cache::Choose::KeyRegexes";
use Catalyst::Plugin::Cache::Backend::Memory;
use base qw/Catalyst::Plugin::Cache Catalyst::Plugin::Cache::Choose::KeyRegexes/;
our %config = (
- cache => {
+ 'Plugin::Cache' => {
key_regexes => [
qr/^foo/ => "foo_store",
qr/^bar/ => "bar_store",
],
+ ### as of 0.06, you must specify a backend
+ backend => {
+ class => 'Catalyst::Plugin::Cache::Backend::Memory',
+ }
},
);
sub config { \%config }
is( $c->get_cache_backend("bar_store")->get("foo_laa"), undef, "no foo key" );
is( $c->get_cache_backend("bar_store")->get("bar_laa"), "laa", "has bar key" );
+done_testing;