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.59'; |
3
|
1
|
|
|
1
|
|
375
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
28
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
0
|
|
|
1
|
|
|
|
|
19
|
|
5
|
1
|
|
|
1
|
|
308
|
use CHI::Test; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
use File::Temp qw(tempdir); |
7
|
|
|
|
|
|
|
use base qw(CHI::t::Driver::Subcache); |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
my $root_dir; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub testing_driver_class { |
12
|
|
|
|
|
|
|
return 'CHI::Driver::File'; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub new_cache_options { |
16
|
|
|
|
|
|
|
my $self = shift; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
$root_dir ||= |
19
|
|
|
|
|
|
|
tempdir( "chi-driver-subcache-mirror-XXXX", TMPDIR => 1, CLEANUP => 1 ); |
20
|
|
|
|
|
|
|
return ( |
21
|
|
|
|
|
|
|
$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
|
|
|
|
|
|
|
sub test_max_key_length { } |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |