spunQ_CacheBuffer Class Reference

A cache caching cached values. More...

Inheritance diagram for spunQ_CacheBuffer:

List of all members.

Public Member Functions

 __construct (spunQ_ICache $cache)
 Constructor.
 store ($key, $value, $timeout=0)
 retrieve ($key, &$value)
 invalidate ($key)
 clear ()

Protected Attributes

 $buffer
 The buffer caching the values.
 $cache
 The actual cache responsible for providing the values.


Detailed Description

A cache caching cached values.

This may sound very silly, but this class is reponsible for caching values that are retrieved from other caches. But this actually makes sense when caching large objects, since most cache implementations serialize and deserialze the cached values, leading to multiple instantiations of the cached objects. This inner cache makes sure that the objects don't get unserialized multiple times, which can have serious impact on performance and/or memory usage and/or application integrity.

Definition at line 13 of file CacheBuffer.class.php.


Constructor & Destructor Documentation

spunQ_CacheBuffer::__construct ( spunQ_ICache $  cache  ) 

Constructor.

Parameters:
$cache The actual cache providing the cached values.

Definition at line 31 of file CacheBuffer.class.php.


Member Data Documentation

spunQ_CacheBuffer::$buffer [protected]

The buffer caching the values.

Type:
spunQ_VariableCache

Definition at line 19 of file CacheBuffer.class.php.

spunQ_CacheBuffer::$cache [protected]

The actual cache responsible for providing the values.

Type:
spunQ_ICache

Definition at line 25 of file CacheBuffer.class.php.


The documentation for this class was generated from the following file:

Generated on Fri Jul 1 11:12:38 2011 for spunQ3 by  doxygen 1.5.9