Overview

Packages

  • Cache

Classes

  • Horde_Cache
  • Horde_Cache_Exception
  • Horde_Cache_Storage_Apc
  • Horde_Cache_Storage_Base
  • Horde_Cache_Storage_Eaccelerator
  • Horde_Cache_Storage_File
  • Horde_Cache_Storage_Memcache
  • Horde_Cache_Storage_Mock
  • Horde_Cache_Storage_Null
  • Horde_Cache_Storage_Session
  • Horde_Cache_Storage_Sql
  • Horde_Cache_Storage_Stack
  • Horde_Cache_Storage_Xcache
  • Overview
  • Package
  • Class
  • Tree

Class Horde_Cache_Storage_Base

This class provides the abstract implementation of the cache storage driver.

Copyright 2010-2012 Horde LLC (http://www.horde.org/)

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Direct known subclasses

Horde_Cache_Storage_Apc, Horde_Cache_Storage_Eaccelerator, Horde_Cache_Storage_File, Horde_Cache_Storage_Memcache, Horde_Cache_Storage_Mock, Horde_Cache_Storage_Null, Horde_Cache_Storage_Session, Horde_Cache_Storage_Sql, Horde_Cache_Storage_Stack, Horde_Cache_Storage_Xcache
Abstract
Package: Cache
Category: Horde
License: LGPL 2.1
Author: Michael Slusarz slusarz@horde.org
Located at Horde/Cache/Storage/Base.php
Methods summary
public
# __construct( array $params = array() )

Constructor.

Constructor.

Parameters

$params
Configuration parameters.
public
# setLogger( Horde_Log_Logger $logger )

Set the logging object.

Set the logging object.

Parameters

$logger
Log object.
abstract public mixed
# get( string $key, integer $lifetime = 0 )

Retrieve cached data.

Retrieve cached data.

Parameters

$key
Object ID to query.
$lifetime
Lifetime of the object in seconds.

Returns

mixed
Cached data, or false if none was found.
abstract public
# set( string $key, mixed $data, integer $lifetime = 0 )

Store an object in the cache.

Store an object in the cache.

Parameters

$key
Object ID used as the caching key.
$data
Data to store in the cache.
$lifetime
<p>Object lifetime - i.e. the time before the data becomes available for garbage collection. If 0 will not be GC'd.</p>
abstract public boolean
# exists( string $key, integer $lifetime = 0 )

Checks if a given key exists in the cache, valid for the given lifetime.

Checks if a given key exists in the cache, valid for the given lifetime.

Parameters

$key
Cache key to check.
$lifetime
Lifetime of the key in seconds.

Returns

boolean
Existence.
abstract public boolean
# expire( string $key )

Expire any existing data for the given key.

Expire any existing data for the given key.

Parameters

$key
Cache key to expire.

Returns

boolean
Success or failure.
abstract public
# clear( )

Clears all data from the cache.

Clears all data from the cache.

Throws

Horde_Cache_Exception
API documentation generated by ApiGen