Path

ez components / documentation / api reference / latest / cache


eZ Components latest

Cache: ezcCacheApcBackend

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

Class: ezcCacheApcBackend

This backend stores data in an APC cache. [source]

Parents

ezcCacheMemoryBackend
   |
   --ezcCacheApcBackend

Method Summary

public ezcCacheApcBackend __construct( )
Constructs a new ezcCacheApcBackend object.
public void acquireLock( $key, $waitTime, $maxTime )
Acquires a lock on the given $key.
public bool delete( $key )
Deletes the data associated with key $key. Returns true or false depending on the success of the operation.
public mixed fetch( $key )
Fetches the data associated with key $key.
public void releaseLock( $key )
Releases a lock on the given $key.
public void reset( )
Resets the complete backend.
public bool store( $key, $var, [$ttl = 0] )
Stores the data $var under the key $key. Returns true or false depending on the success of the operation.

Inherited Methods

From ezcCacheMemoryBackend :
public abstract bool ezcCacheMemoryBackend::delete()
Deletes the data associated with key $key.
public abstract mixed ezcCacheMemoryBackend::fetch()
Fetches the data associated with key $key.
public abstract bool ezcCacheMemoryBackend::store()
Stores the data $var under the key $key.

Methods

__construct

ezcCacheApcBackend __construct( )
Constructs a new ezcCacheApcBackend object.

Throws

ClassDescription
ezcBaseExtensionNotFoundException If the PHP apc extension is not installed.

acquireLock

void acquireLock( string $key, int $waitTime, int $maxTime )
Acquires a lock on the given $key.

Parameters

Name Type Description
$key string  
$waitTime int usleep()
$maxTime int seconds

delete

bool delete( string $key )
Deletes the data associated with key $key. Returns true or false depending on the success of the operation.

Parameters

Name Type Description
$key string  

Redefinition of

Method Description
ezcCacheMemoryBackend::delete() Deletes the data associated with key $key.

fetch

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

Parameters

Name Type Description
$key mixed  

Redefinition of

Method Description
ezcCacheMemoryBackend::fetch() Fetches the data associated with key $key.

releaseLock

void releaseLock( string $key )
Releases a lock on the given $key.

Parameters

Name Type Description
$key string  

reset

void reset( )
Resets the complete backend.
Marked private to not expose more of this interface to the user, since this will be removed in future versions.

store

bool store( string $key, mixed $var, [int $ttl = 0] )
Stores the data $var under the key $key. Returns true or false depending on the success of the operation.

Parameters

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

Redefinition of

Method Description
ezcCacheMemoryBackend::store() Stores the data $var under the key $key.

Last updated: Tue, 02 Dec 2008