| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
=head1 NAME |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
Cache::RemovalStrategy - abstract Removal Strategy interface for a Cache |
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 METHODS |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=over |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=cut |
|
12
|
|
|
|
|
|
|
package Cache::RemovalStrategy; |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
require 5.006; |
|
15
|
7
|
|
|
7
|
|
820
|
use strict; |
|
|
7
|
|
|
|
|
11
|
|
|
|
7
|
|
|
|
|
218
|
|
|
16
|
7
|
|
|
7
|
|
29
|
use warnings; |
|
|
7
|
|
|
|
|
9
|
|
|
|
7
|
|
|
|
|
148
|
|
|
17
|
7
|
|
|
7
|
|
28
|
use Carp; |
|
|
7
|
|
|
|
|
10
|
|
|
|
7
|
|
|
|
|
803
|
|
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
our $VERSION = '2.11'; |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub new { |
|
23
|
7
|
|
|
7
|
0
|
12
|
my Cache::RemovalStrategy $self = shift; |
|
24
|
|
|
|
|
|
|
|
|
25
|
7
|
50
|
|
|
|
18
|
ref $self or croak 'Must use a subclass of Cache::RemovalStrategy'; |
|
26
|
7
|
|
|
|
|
37
|
return $self; |
|
27
|
|
|
|
|
|
|
} |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=item $r->remove_size( $cache, $size ) |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
When invoked, removes entries from the cache that total at least $size in |
|
33
|
|
|
|
|
|
|
size. |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=cut |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub remove_size; |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |
|
41
|
|
|
|
|
|
|
__END__ |