Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

alzabo::runtime::uniquerowcache(3pm) [debian man page]

Alzabo::Runtime::UniqueRowCache(3pm)			User Contributed Perl Documentation		      Alzabo::Runtime::UniqueRowCache(3pm)

NAME
Alzabo::Runtime::UniqueRowCache - Implements a row cache for Alzabo SYNOPSIS
use Alzabo::Runtime::UniqueRowCache; Alzabo::Runtime::UniqueRowCache->clear(); DESCRIPTION
This 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. METHODS
All methods provided are class methods. * clear This clears the entire cache * clear_table( $table_object ) Given a table object, this method clears all the cached rows from that table. * row_in_cache( $table_name, $row_id ) Given a table name and a row id, as returned by the "Alzabo::Runtime::Row->id_as_string" method, this method returns the matching row from the cache, if it exists. Otherwise it returns undef. * delete_from_cache( $table_name, $row_id ) Given a table name and a row id, as returned by the "Alzabo::Runtime::Row->id_as_string" method, this method returns the matching row from the cache. * write_to_cache( $row_object ) Given a row object, this method stores it in the cache. AVOIDING THE CACHE
If 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()". AUTHOR
Dave Rolsky, <autarch@urth.org> perl v5.8.8 2007-12-23 Alzabo::Runtime::UniqueRowCache(3pm)

Check Out this Related Man Page

Alzabo::Exceptions(3pm) 				User Contributed Perl Documentation				   Alzabo::Exceptions(3pm)

NAME
Alzabo::Exceptions - Creates all exception subclasses used in Alzabo. SYNOPSIS
use Alzabo::Exceptions; DESCRIPTION
Using this class creates all the exceptions classes used by Alzabo (via the "Exception::Class" class). See "Exception::Class" for more information on how this is done. EXCEPTION CLASSES
* Alzabo::Exception This is the base class for all exceptions generated within Alzabo (all exceptions should return true for "$@->isa('Alzabo::Exception')" except those that are generated via internal Perl errors). * Alzabo::Exception::Driver An error occured while accessing a database. See "Alzabo::Driver" for more details. * Alzabo::Exception::Eval An attempt to eval something returned an error. * Alzabo::Exception::Logic Alzabo was asked to do something logically impossible, like retrieve rows for a table without a primary key. * Alzabo::Exception::NoSuchRow An attempt was made to fetch data from the database with a primary key that does not actually exist in the specified table. * Alzabo::Exception::NotNullable An attempt was made to set a non-nullable column to "NULL". The "column_name", "table_name", and "schema_name" fields can be used to identify the exact column. * Alzabo::Exception::Panic This exception is thrown when something completely unexpected happens (think Monty Python). * Alzabo::Exception::Params This exception is thrown when there is a problem with the parameters passed to a method or function. These problems can include miss- ing parameters, invalid values, etc. * Alzabo::Exception::RDBMSRules A rule for the relevant RDBMS was violated (bad schema name, table name, column attribute, etc.) * Alzabo::Exception::ReferentialIntegrity An insert/update/delete was attempted that would violate referential integrity constraints. * Alzabo::Exception::SQL An error thrown when there is an attempt to generate invalid SQL via the Alzabo::SQLMaker module. * Alzabo::Exception::Storable A error when trying to freeze, thaw, or clone an object using Storable. * Alzabo::Exception::System Some sort of system call (file read/write, stat, etc.) failed. * Alzabo::Exception::VirtualMethod A virtual method was called. This indicates that this method should be subclassed. AUTHOR
Dave Rolsky, <autarch@urth.org> perl v5.8.8 2007-12-23 Alzabo::Exceptions(3pm)
Man Page