Lines 54-69
SKIP: {
Link Here
|
54 |
} |
54 |
} |
55 |
|
55 |
|
56 |
# test expiry time in cache |
56 |
# test expiry time in cache |
57 |
$cache->set_in_cache( "timeout", "I AM DATA", 1 ); # expiry time of 1 second |
57 |
$cache->set_in_cache( "timeout", "I AM DATA", { expiry => 1 } ); # expiry time of 1 second |
58 |
sleep 2; |
58 |
sleep 2; |
59 |
$cache->flush_L1_cache(); |
59 |
$cache->flush_L1_cache(); |
60 |
is( $cache->get_from_cache("timeout"), |
60 |
is( $cache->get_from_cache("timeout"), |
61 |
undef, "fetching expired item from cache" ); |
61 |
undef, "fetching expired item from cache" ); |
62 |
|
62 |
|
63 |
# test fetching a valid, non expired, item from cache |
63 |
# test fetching a valid, non expired, item from cache |
64 |
$cache->set_in_cache( "clear_me", "I AM MORE DATA", 1000 ) |
64 |
$cache->set_in_cache( "clear_me", "I AM MORE DATA", { expiry => 1000 } ) |
65 |
; # overly large expiry time, clear below |
65 |
; # overly large expiry time, clear below |
66 |
$cache->set_in_cache( "dont_clear_me", "I AM MORE DATA22", 1000 ) |
66 |
$cache->set_in_cache( "dont_clear_me", "I AM MORE DATA22", { expiry => 1000 } ) |
67 |
; # overly large expiry time, clear below |
67 |
; # overly large expiry time, clear below |
68 |
is( |
68 |
is( |
69 |
$cache->get_from_cache("clear_me"), |
69 |
$cache->get_from_cache("clear_me"), |
70 |
- |
|
|