line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catalyst::Plugin::Cache::BerkeleyDB; |
2
|
1
|
|
|
1
|
|
851
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
37
|
|
3
|
1
|
|
|
1
|
|
6
|
use base qw/Class::Data::Inheritable/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
817
|
|
4
|
|
|
|
|
|
|
use Cache::BerkeleyDB; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION= '0.01'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub setup { |
9
|
|
|
|
|
|
|
my $self = shift; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
my $params = $self->config->{cache} || {}; |
12
|
|
|
|
|
|
|
$params->{cache_root} = delete $params->{storage} if $params->{storage}; |
13
|
|
|
|
|
|
|
$params->{default_expires_in} = delete $params->{expires} if $params->{expires}; |
14
|
|
|
|
|
|
|
$params->{namespace} ||= $self; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
__PACKAGE__->mk_classdata(cache => Cache::BerkeleyDB->new($params)); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
$self->NEXT::setup(@_); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
1; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
__END__ |