line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CHI::t::Driver::CacheCache; |
2
|
|
|
|
|
|
|
$CHI::t::Driver::CacheCache::VERSION = '0.61'; |
3
|
1
|
|
|
1
|
|
475
|
use strict; |
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
31
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
5
|
1
|
|
|
1
|
|
381
|
use CHI::Test; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
8
|
|
6
|
1
|
|
|
1
|
|
2444
|
use File::Temp qw(tempdir); |
|
1
|
|
|
|
|
19764
|
|
|
1
|
|
|
|
|
80
|
|
7
|
1
|
|
|
1
|
|
13
|
use base qw(CHI::t::Driver); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
896
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
my $root_dir; |
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
0
|
5
|
sub supports_expires_on_backend { 1 } |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub required_modules { |
14
|
1
|
|
|
1
|
0
|
8
|
return { 'Cache::Cache' => undef, 'Cache::FileCache' => undef }; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub new_cache_options { |
18
|
87
|
|
|
87
|
0
|
195
|
my $self = shift; |
19
|
|
|
|
|
|
|
|
20
|
87
|
|
66
|
|
|
410
|
$root_dir ||= |
21
|
|
|
|
|
|
|
tempdir( "chi-driver-cachecache-XXXX", TMPDIR => 1, CLEANUP => 1 ); |
22
|
|
|
|
|
|
|
return ( |
23
|
87
|
|
|
|
|
1226
|
$self->SUPER::new_cache_options(), |
24
|
|
|
|
|
|
|
cc_class => 'Cache::FileCache', |
25
|
|
|
|
|
|
|
cc_options => { cache_root => $root_dir } |
26
|
|
|
|
|
|
|
); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub set_standard_keys_and_values { |
30
|
1
|
|
|
1
|
0
|
3
|
my ($self) = @_; |
31
|
|
|
|
|
|
|
|
32
|
1
|
|
|
|
|
9
|
my ( $keys, $values ) = $self->SUPER::set_standard_keys_and_values(); |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
# Cache::FileCache apparently cannot handle key = 0 |
35
|
1
|
|
|
|
|
4
|
$keys->{'zero'} = 'zero'; |
36
|
|
|
|
|
|
|
|
37
|
1
|
|
|
|
|
3
|
return ( $keys, $values ); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
# Skip multiple process test - Cache::FileCache will hit occasional rename failures under this test |
41
|
|
|
|
0
|
0
|
|
sub test_multiple_procs { } |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
1; |