Path

ez components / documentation / api reference / 2007.2 / cache


Cache: ezcCacheStorageMemcachePlain

[ Tutorial ] [ Class tree ] [ Element index ] [ ChangeLog ] [ Credits ]

Class: ezcCacheStorageMemcachePlain

This storage implementation stores data in a Memcache cache. [source]

Parents

ezcCacheStorage
   |
   --ezcCacheStorageMemory
      |
      --ezcCacheStorageMemcache
         |
         --ezcCacheStorageMemcachePlain

Inherited Constants

From ezcCacheStorageMemcache:
ezcCacheStorageMemcache::BACKEND_NAME    The backend name.
ezcCacheStorageMemcache::REGISTRY_NAME    The registry name.

Inherited Member Variables

From ezcCacheStorageMemory:
protected  ezcCacheStorageMemory::$backend
protected  ezcCacheStorageMemory::$backendName
protected  ezcCacheStorageMemory::$registry
protected  ezcCacheStorageMemory::$registryName
protected  ezcCacheStorageMemory::$searchRegistry
From ezcCacheStorage:
protected  ezcCacheStorage::$properties

Method Summary

protected mixed fetchData( $identifier, [$object = false] )
Fetches data from the cache.
protected ezcCacheStorageMemoryDataStruct prepareData( $data )
Wraps the data in an ezcCacheStorageMemoryDataStruct structure in order to store it.

Inherited Methods

From ezcCacheStorageMemcache :
public ezcCacheStorageMemcache ezcCacheStorageMemcache::__construct()
Creates a new cache storage in the given location.
protected abstract mixed ezcCacheStorageMemcache::fetchData()
Fetches the data from the cache.
protected abstract mixed ezcCacheStorageMemcache::prepareData()
Prepare the data for storing.
From ezcCacheStorageMemory :
public ezcCacheStorageMemory ezcCacheStorageMemory::__construct()
Creates a new cache storage in the given location.
protected int ezcCacheStorageMemory::calcLifetime()
Calculates the lifetime remaining for a cache object.
public int ezcCacheStorageMemory::countDataItems()
Returns the number of items in the cache matching a certain criteria.
public void ezcCacheStorageMemory::delete()
Deletes the data associated with $id or $attributes from the cache.
protected void ezcCacheStorageMemory::fetchSearchRegistry()
Fetches the search registry from the backend or creates it if empty.
protected string ezcCacheStorageMemory::generateAttrStr()
Generates a string from the $attributes array.
public string ezcCacheStorageMemory::generateIdentifier()
Generates the storage internal identifier from ID and attributes.
public int ezcCacheStorageMemory::getRemainingLifetime()
Returns the time in seconds which remains for a cache object, before it gets outdated. In case the cache object is already outdated or does not exists, this method returns 0.
protected void ezcCacheStorageMemory::registerIdentifier()
Registers an identifier to facilitate searching.
public mixed ezcCacheStorageMemory::restore()
Restores the data from the cache.
protected array(mixed) ezcCacheStorageMemory::search()
Searches the storage for data defined by ID and/or attributes.
public string ezcCacheStorageMemory::store()
Stores data to the cache storage under the key $id.
protected void ezcCacheStorageMemory::storeSearchRegistry()
Stores the search registry in the backend.
protected void ezcCacheStorageMemory::unRegisterIdentifier()
Un-registers a previously registered identifier.
protected void ezcCacheStorageMemory::validateLocation()
Checks if the location property is valid.
From ezcCacheStorage :
public ezcCacheStorage ezcCacheStorage::__construct()
Creates a new cache storage in the given location.
public abstract int ezcCacheStorage::countDataItems()
Return the number of items in the cache matching a certain criteria.
public abstract void ezcCacheStorage::delete()
Delete data from the cache.
public string ezcCacheStorage::getLocation()
Returns the location.
public ezcCacheStorageOptions ezcCacheStorage::getOptions()
Return the currently set options.
public abstract int ezcCacheStorage::getRemainingLifetime()
Returns the time ( in seconds ) that remains for a cache object, before it gets outdated. In case the cache object is already outdated or does not exists, this method returns 0.
public abstract mixed ezcCacheStorage::restore()
Restore data from the cache.
public void ezcCacheStorage::setOptions()
Set new options.
public abstract string ezcCacheStorage::store()
Store data to the cache storage.
protected abstract void ezcCacheStorage::validateLocation()
Checks if the location property is valid.

Methods

fetchData

mixed fetchData( string $identifier, [bool $object = false] )
Fetches data from the cache.

Parameters

Name Type Description
$identifier string The file to fetch data from
$object bool Return the object and not the clean data

Redefinition of

Method Description
ezcCacheStorageMemcache::fetchData() Fetches the data from the cache.

prepareData

ezcCacheStorageMemoryDataStruct prepareData( mixed $data )
Wraps the data in an ezcCacheStorageMemoryDataStruct structure in order to store it.

Parameters

Name Type Description
$data mixed Simple type or array

Throws

ClassDescription
ezcCacheInvalidDataException If the data submitted can not be handled by this storage (resource).

Redefinition of

Method Description
ezcCacheStorageMemcache::prepareData() Prepare the data for storing.

Last updated: Mon, 17 Dec 2007