1Cache::Simple::TimedExpUisreyr(3C)ontributed Perl DocumeCnatcahtei:o:nSimple::TimedExpiry(3)
2
3
4

NAME

6       Cache::Simple::TimedExpiry
7
8       EXAMPLE
9
10        package main;
11
12        use strict;
13        use warnings;
14        $,=' '; $⎪++;
15
16        use Cache::Simple::TimedExpiry;
17        my $h =  Cache::Simple::TimedExpiry->new;
18
19        $h->set( DieQuick => "No duration!", 0);
20        print $h->elements;
21        do { $h->set($_,"Value of $_", 1); sleep 2;}
22           for qw(Have a nice day you little monkey);
23
24        print $h->elements; $h->dump; sleep 4; print $h->elements; $h->dump;
25
26        print time;
27
28       new
29
30       Set up a new cache object
31
32       expire_after SECONDS
33
34       Set the cache's expiry policy to expire entries after SECONDS seconds.
35       Setting this changes the expiry policy for pre-existing cache entries
36       and for new ones.
37
38       has_key KEY
39
40       Return true if the cache has an entry with the key KEY
41
42       fetch KEY
43
44       Return the cache entry with key KEY.  Returns undef if there is no such
45       entry
46
47       (Can also be called as get)
48
49       store KEY VALUE
50
51       Store VALUE in the cache with accessor KEY.  Expire it from the cache
52       at or after EXPIRYTIME.
53
54       (Can also be called as set)
55

AUTHOR

57       Jesse Vincent <jesse@bestpractical.com> Some of the heavy lifting was
58       designed by Robert Spier <rspier@pobox.com>
59
60       Copyright 2004 Jesse Vincent <jesse@bestpractical.com>
61
62
63
64perl v5.8.8                       2006-11-20     Cache::Simple::TimedExpiry(3)
Impressum