Alzabo::ObjectCache::Store::Memory - Cache objects in memory
use Alzabo::ObjectCache( store => 'Alzabo::ObjectCache::Store::Memory', sync => 'Alzabo::ObjectCache::Sync::Null' );
This class simply stores cached objects in memory. This means that a given object should never have to be created twice.
This module has no upper limit on how many objects it will store. If you are operating in a persistent environment such as mod_perl, these will have a tendency to eat up memory over time.
In order to prevent processes from growing without stop, it is recommended that you call the clear method at the entry point(s) for your persistent application. This will flush the cache completely.
clear
Note that pretty much all the methods that take an object as an argument will silently do nothing if the object is not already in the cache. The obvious exception is the store_object method.
store_object
A new Alzabo::ObjectCache::Store::Memory object.
Alzabo::ObjectCache::Store::Memory
The specified object if it is in the cache. Otherwise it returns undef.
Stores an object in the cache. This will not overwrite an existing object in the cache. To do that you must first call the delete_from_cache method.
delete_from_cache
This method allows you to remove an object from the cache. This does not register the object as deleted. It is provided solely so that you can call store_object after calling this method and have store_object actually store the new object.
Call this method to completely clear the cache.
Dave Rolsky, <autarch@urth.org>
To install Alzabo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Alzabo
CPAN shell
perl -MCPAN -e shell install Alzabo
For more information on module installation, please visit the detailed CPAN module installation guide.