The Horde_Cache_sql:: class provides a SQL implementation of the Horde Caching system.
Required parameters:
'phptype' The database type (ie. 'pgsql', 'mysql', etc.).
Required by some database implementations:
'database' The name of the database. 'hostspec' The hostname of the database server. 'username' The username with which to connect to the database. 'password' The password associated with 'username'. 'options' Additional options to pass to the database. 'tty' The TTY on which to connect to the database. 'port' The port on which to connect to the database.
Optional parameters:
'table' The name of the cache table in 'database'. Defaults to 'horde_cache'. 'use_memorycache' Use a Horde_Cache:: memory caching driver to cache the data (to avoid DB accesses). Either empty or 'none' if not needed, or else the name of a valid Horde_Cache:: driver.
Optional values when using separate reading and writing servers, for example in replication settings:
'splitread' Boolean, whether to implement the separation or not. 'read' Array containing the parameters which are different for the read database connection, currently supported only 'hostspec' and 'port' parameters.
The table structure for the cache is as follows:
CREATE TABLE horde_cache ( cache_id VARCHAR(32) NOT NULL, cache_timestamp BIGINT NOT NULL, cache_data LONGBLOB, (Or on PostgreSQL:) cache_data TEXT, (Or on some other DBMS systems:) cache_data IMAGE, PRIMARY KEY (cache_id) );
$Horde: framework/Cache/Cache/sql.php,v 1.12.2.13 2009/02/25 05:35:42 chuck Exp $
Copyright 2007-2009 The Horde Project (http://www.horde.org/)
See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
Located in /Cache/Cache/sql.php (line 60)
Horde_Cache | --Horde_Cache_sql
Boolean indicating whether or not we're connected to the SQL server.
Handle for the current database connection.
The memory cache object to use, if configured.
Handle for the current database connection, used for writing. Defaults to the same handle as $_db if a separate write database isn't required.
Inherited from Horde_Cache
Horde_Cache::$_params
Constructs a new Horde_Cache_sql object.
Checks if a given key exists in the cache, valid for the given lifetime.
Expire any existing data for the given key.
Attempts to retrieve cached data.
Attempts to store data.
Opens a connection to the SQL server.
Inherited From Horde_Cache
Horde_Cache::Horde_Cache()
Horde_Cache::exists()
Horde_Cache::expire()
Horde_Cache::factory()
Horde_Cache::get()
Horde_Cache::output()
Horde_Cache::set()
Horde_Cache::singleton()
Horde_Cache::_getLifetime()
Documentation generated on Sun, 30 Jan 2011 05:21:49 +0000 by phpDocumentor 1.4.3