line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CHI::t::Driver::CacheCache; |
2
|
|
|
|
|
|
|
$CHI::t::Driver::CacheCache::VERSION = '0.60'; |
3
|
1
|
|
|
1
|
|
370
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
30
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
21
|
|
5
|
1
|
|
|
1
|
|
319
|
use CHI::Test; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
6
|
1
|
|
|
1
|
|
668
|
use File::Temp qw(tempdir); |
|
1
|
|
|
|
|
15427
|
|
|
1
|
|
|
|
|
60
|
|
7
|
1
|
|
|
1
|
|
6
|
use base qw(CHI::t::Driver); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
527
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
my $root_dir; |
10
|
|
|
|
|
|
|
|
11
|
0
|
|
|
0
|
0
|
0
|
sub supports_expires_on_backend { 1 } |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub required_modules { |
14
|
1
|
|
|
1
|
0
|
5
|
return { 'Cache::Cache' => undef, 'Cache::FileCache' => undef }; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub new_cache_options { |
18
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
0
|
|
|
|
$root_dir ||= |
21
|
|
|
|
|
|
|
tempdir( "chi-driver-cachecache-XXXX", TMPDIR => 1, CLEANUP => 1 ); |
22
|
|
|
|
|
|
|
return ( |
23
|
0
|
|
|
|
|
|
$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
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
|
my ( $keys, $values ) = $self->SUPER::set_standard_keys_and_values(); |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
# Cache::FileCache apparently cannot handle key = 0 |
35
|
0
|
|
|
|
|
|
$keys->{'zero'} = 'zero'; |
36
|
|
|
|
|
|
|
|
37
|
0
|
|
|
|
|
|
return ( $keys, $values ); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
# Skip multiple process test - Cache::FileCache will hit occasional rename failures under this test |
41
|
0
|
|
|
0
|
0
|
|
sub test_multiple_procs { } |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
1; |