Alzabo::ObjectCache::Sync::Null - No inter-process cache syncing |
Alzabo::ObjectCache::Sync::Null - No inter-process cache syncing
use Alzabo::ObjectCache( store => 'Alzabo::ObjectCache::Store::Memory', sync => 'Alzabo::ObjectCache::Sync::Null' );
This class does not do any actual inter-process syncing. It does, however, keep track of deleted objects. This is needed in the case where one part of a program deletes an object to which another part of the program has a refence. If the other part attempts to use the object an exception will be thrown.
If you are running Alzabo as part of a single-process application, using this syncing module along with one of the caching modules will increase the speed of your application. Using it in a multi-process situation is likely to cause data corruption unless your application is entirely read-only.
A new Alzabo::ObjectCache
object.
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.
Objects cached in this class are never expired.
This always false for this class because there is no notion of expiration for this cache.
A boolean value indicating whether or not an object has been deleted from the cache.
This does nothing in this class.
This does nothing in this class.
This tells the cache that the object has been removed from its
external data source. This causes the cache to remove the object
internally. Future calls to
is_deleted
for this
object will now return true.
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.
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. You can also call this method whenever you know you are
done using any row objects you've created up to a certain point in
your application. However, if you plan on creating them again later
it would probably be a performance win to not do this.
Dave Rolsky, <autarch@urth.org>
Alzabo::ObjectCache::Sync::Null - No inter-process cache syncing |