new

Set up a new cache object

store KEY VALUE EXPIRYTIME

Store VALUE in the cache with accessor KEY. Expire it from the cache at or after EXPIRYTIME.

EXPIRYTIME is in seconds from now

Setting EXPIRYTIME to 0 means "Never expire"

NAME

Cache::Simple::TimedExpiry

EXAMPLE

package main; use strict; use warnings;

my $h = new Cache::Simple::TimedExpiry;

$h->set( Forever => "Don't expire", 0); do { $h->set($_,"Value of $_", 1); sleep 2;} for qw(Have a nice day you little monkey); $,=' ';

print $h->elements; $h->dump; sleep 4; print $h->elements; $h->dump;

print time;