line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
###################################################################### |
2
|
|
|
|
|
|
|
# $Id: SizeAwareCache.pm,v 1.10 2002/04/07 17:04:46 dclinton Exp $ |
3
|
|
|
|
|
|
|
# Copyright (C) 2001-2003 DeWitt Clinton All Rights Reserved |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# Software distributed under the License is distributed on an "AS |
6
|
|
|
|
|
|
|
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either expressed or |
7
|
|
|
|
|
|
|
# implied. See the License for the specific language governing |
8
|
|
|
|
|
|
|
# rights and limitations under the License. |
9
|
|
|
|
|
|
|
###################################################################### |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
package Cache::SizeAwareCache; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
2
|
|
|
2
|
|
10
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
104
|
|
16
|
2
|
|
|
2
|
|
11
|
use Cache::Cache; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
82
|
|
17
|
2
|
|
|
2
|
|
9
|
use vars qw( @ISA @EXPORT_OK $EXPIRES_NOW $EXPIRES_NEVER $NO_MAX_SIZE ); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
167
|
|
18
|
2
|
|
|
2
|
|
10
|
use Exporter; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
213
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
@ISA = qw( Cache::Cache Exporter ); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
@EXPORT_OK = qw( $EXPIRES_NOW $EXPIRES_NEVER $NO_MAX_SIZE ); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
$EXPIRES_NOW = $Cache::Cache::EXPIRES_NOW; |
25
|
|
|
|
|
|
|
$EXPIRES_NEVER = $Cache::Cache::EXPIRES_NEVER; |
26
|
|
|
|
|
|
|
$NO_MAX_SIZE = -1; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub limit_size; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub get_max_size; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub set_max_size; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
__END__ |