Path

ez components / documentation / api reference / 2008.2 / cache


eZ Components 2008.2

Cache: ezcCacheMemoryBackend

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

Class: ezcCacheMemoryBackend

An abstract class defining the required methods for memory handlers. [source]

Descendents

Child Class Description
ezcCacheApcBackend This backend stores data in an APC cache.
ezcCacheMemcacheBackend This backend stores data in a Memcache.

Method Summary

public abstract bool delete( $key )
Deletes the data associated with key $key.
public abstract mixed fetch( $key )
Fetches the data associated with key $key.
public abstract bool store( $key, $var, [$ttl = 0] )
Stores the data $var under the key $key.

Methods

delete

bool delete( string $key )
Deletes the data associated with key $key.

Parameters

Name Type Description
$key string  

Redefined in descendants as

Method Description
ezcCacheApcBackend::delete() Deletes the data associated with key $key. Returns true or false depending on the success of the operation.
ezcCacheMemcacheBackend::delete() Deletes the data from the cache associated with key $key. Returns true or false depending on the success of the operation.

fetch

mixed fetch( string $key )
Fetches the data associated with key $key.

Parameters

Name Type Description
$key string  

Redefined in descendants as

Method Description
ezcCacheApcBackend::fetch() Fetches the data associated with key $key.
ezcCacheMemcacheBackend::fetch() Returns the data from the cache associated with key $key.

store

bool store( string $key, mixed $var, [int $ttl = 0] )
Stores the data $var under the key $key.

Parameters

Name Type Description
$key string  
$var mixed  
$ttl int  

Redefined in descendants as

Method Description
ezcCacheApcBackend::store() Stores the data $var under the key $key. Returns true or false depending on the success of the operation.
ezcCacheMemcacheBackend::store() Adds the $var data to the cache under the key $key. Returns true or false depending on the success of the operation.

Last updated: Mon, 05 Jan 2009