|
NAMEAlzabo::Runtime::UniqueRowCache - Implements a row cache for AlzaboSYNOPSISuse Alzabo::Runtime::UniqueRowCache; Alzabo::Runtime::UniqueRowCache->clear(); DESCRIPTIONThis is a very simple caching mechanism for "Alzabo::Runtime::Row" objects that tries to ensure that for there is never more than one row object in memory for a given database row.To use it, simply load it. It can be foiled through the use of "Storable" or other "deep magic" cloning code, like in the "Clone" module. The cache is a simple hash kept in memory. If you use this module, you are responsible for clearing the cache as needed. The only time it is cleared automatically is when a table update or delete is performed, in which case all cached rows for that table are cleared. In a persistent environment like mod_perl, you should clear the cache on a regular basis in order to prevent the cache from getting out of sync with the database. A good way to do this is to clear it at the start of every request. METHODSAll methods provided are class methods.
AVOIDING THE CACHEIf you want to not cache a row, then you can pass the "no_cache" parameter to any table or schema method that creates a new row object or a cursor, such as "Alzabo::Runtime::Table->insert()", "Alzabo::Runtime::Table->rows_where()".AUTHORDave Rolsky, <autarch@urth.org>
Visit the GSP FreeBSD Man Page Interface. |