Skip to content

Commit

Permalink
Solves problem with Cache::BaseCache and paramters
Browse files Browse the repository at this point in the history
  • Loading branch information
bolav committed Apr 13, 2015
1 parent ee461b6 commit a02130e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/WWW/Mechanize/Cached.pm
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ sub _isa_warn_cache {
sub _build_cache {
my $self = shift;

return Cache::FileCache->new(
return Cache::FileCache->new({
default_expires_in => '1d',
namespace => 'www-mechanize-cached',
) if try_load_class 'Cache::FileCache';
}) if try_load_class 'Cache::FileCache';
return CHI->new(
driver => 'File',
expires_in => '1d',
Expand Down
14 changes: 14 additions & 0 deletions t/default.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env perl

use strict;
use warnings;

use Test::More tests => 1;

BEGIN {
use_ok('WWW::Mechanize::Cached');
}

my $mech = WWW::Mechanize::Cached->new;

$mech->get('http://www.wikipedia.com');

0 comments on commit a02130e

Please sign in to comment.