
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. | |
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.
| spunQ_CacheBuffer::__construct | ( | spunQ_ICache $ | cache | ) |
Constructor.
| $cache | The actual cache providing the cached values. |
Definition at line 31 of file CacheBuffer.class.php.
spunQ_CacheBuffer::$buffer [protected] |
The buffer caching the values.
Definition at line 19 of file CacheBuffer.class.php.
spunQ_CacheBuffer::$cache [protected] |
The actual cache responsible for providing the values.
Definition at line 25 of file CacheBuffer.class.php.
1.5.9