line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CHI::t::Driver::Subcache::mirror_cache; |
2
|
|
|
|
|
|
|
$CHI::t::Driver::Subcache::mirror_cache::VERSION = '0.60'; |
3
|
1
|
|
|
1
|
|
382
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
28
|
|
5
|
1
|
|
|
1
|
|
282
|
use CHI::Test; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
6
|
|
6
|
1
|
|
|
1
|
|
722
|
use File::Temp qw(tempdir); |
|
1
|
|
|
|
|
17048
|
|
|
1
|
|
|
|
|
62
|
|
7
|
1
|
|
|
1
|
|
7
|
use base qw(CHI::t::Driver::Subcache); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
410
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
my $root_dir; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub testing_driver_class { |
12
|
79
|
|
|
79
|
0
|
843
|
return 'CHI::Driver::File'; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub new_cache_options { |
16
|
79
|
|
|
79
|
0
|
118
|
my $self = shift; |
17
|
|
|
|
|
|
|
|
18
|
79
|
|
66
|
|
|
245
|
$root_dir ||= |
19
|
|
|
|
|
|
|
tempdir( "chi-driver-subcache-mirror-XXXX", TMPDIR => 1, CLEANUP => 1 ); |
20
|
|
|
|
|
|
|
return ( |
21
|
79
|
|
|
|
|
914
|
$self->SUPER::new_cache_options(), |
22
|
|
|
|
|
|
|
depth => 2, |
23
|
|
|
|
|
|
|
root_dir => $root_dir, |
24
|
|
|
|
|
|
|
mirror_to_cache => { driver => 'File', depth => 3 }, |
25
|
|
|
|
|
|
|
); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
# This tries to create its own mirror cache |
29
|
1
|
|
|
1
|
0
|
155
|
sub test_max_key_length { } |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |