XAO::DO::Cache::Memory - memory storage back-end for XAO::Cache
You should not use this object directly, it is a back-end for XAO::Cache.
if($backend->exists(\@c)) { return $backend->get(\@c); }
Cache::Memory is the default implementation of XAO::Cache back-end. It stores data in memory.
Calculates size in bytes of the given reference.
Drops an element from the cache.
Checks if an element exists in the cache. Does not update its access time, but checks it. If the element should be expired it removes it from the cache and returns false.
Retrieves an element from the cache. Does not check if it is expired or not, that is done in exists() method, but update access time.
Makes a key from the given list of coordinates.
Add a new element to the cache; before adding it checks cache size and throws out elements to make space for the new element. Order of removal depends on when an element was accessed last.
Sets expiration time and maximum cache size.
###############################################################################
drop_oldest ($)
Drops oldest element from the cache using supplied key and element.
print_chain ()
Prints cache as a chain from the most recent to the least recent. The order is most_recent->next->...->next->least_recent.
touch ($)
Private method that updates access time and moves an element to the most recent position.
Copyright (c) 2002 XAO Inc.
Andrew Maltsev <am@xao.com>.
Have a look at: XAO::DO::Cache::Memory, XAO::Objects, XAO::Base, XAO::FS, XAO::Web.
1 POD Error
The following errors were encountered while parsing the POD:
You can't have =items (as at line 245) unless the first thing after the =over is an =item
To install XAO::Base, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XAO::Base
CPAN shell
perl -MCPAN -e shell install XAO::Base
For more information on module installation, please visit the detailed CPAN module installation guide.