Contains information about cache entries
version 0.58
my $object = $cache->get_object($key); my $key = $object->key(); my $value = $object->value(); my $expires_at = $object->expires_at(); my $created_at = $object->created_at(); if ($object->is_expired()) { ... }
The \s-1CHI\s0 method returns this object if the key exists. The object will be returned even if the entry has expired, as long as it has not been removed.
There is currently no public \s-1API\s0 for creating one of these objects directly.
All methods are read-only. The get_* methods are provided for backward compatibility with Cache::Cache's Cache::Object.
The key.
The value.
Epoch time at which item expires.
Epoch time at which item was last written to.
Returns boolean indicating whether item has expired. This may be probabilistically determined if an \*(L"expires_variance\*(R" was used.
\s-1CHI\s0
Jonathan Swartz <[email protected]>
This software is copyright (c) 2012 by Jonathan Swartz.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.