CHI
view release on metacpan or search on metacpan
The following methods are distributed to both the primary cache and subcache:
clear
expire
purge
remove
The following methods return information solely from the primary cache.
However, you are free to call them explicitly on the subcache. (Trying to merge
in subcache information automatically would require too much guessing about the
caller's intent.)
get_keys
get_namespaces
get_object
get_expires_at
exists_and_is_expired
is_valid
dump_as_hash
lib/CHI/Util.pm view on Meta::CPAN
}
$size_left -= $write_cnt;
$offset += $write_cnt;
} while ( $size_left > 0 );
}
}
{
# For efficiency, use Data::UUID to generate an initial unique id, then suffix it to
# generate a series of 0x10000 unique ids. Not to be used for hard-to-guess ids, obviously.
my $uuid;
my $suffix = 0;
sub unique_id {
if ( !$suffix || !defined($uuid) ) {
my $ug = Data::UUID->new();
$uuid = $ug->create_hex();
}
my $hex = sprintf( '%s%04x', $uuid, $suffix );
( run in 0.915 second using v1.01-cache-2.11-cpan-748bfb374f4 )