| 
    Elgg
    Version 1.11
    
   | 
 
  
Public Member Functions | |
| get ($key, callable $callback) | |
| Fetches a value from the cache, calculating on miss via $callback.  More... | |
| invalidate ($key) | |
| Forcefully invalidates the value associated with the given key.  More... | |
| put ($key, $value) | |
| Prime the cache to a specific value.  More... | |
| Elgg\Cache\Pool::get | ( | $key, | |
| callable | $callback | ||
| ) | 
Fetches a value from the cache, calculating on miss via $callback.
| string | int | $key | A plain string ID for the cache entry | 
| callable | $callback | Logic for calculating the cache entry on miss | 
Implemented in Elgg\Cache\StashPool, Elgg\Cache\NullPool, and Elgg\Cache\MemoryPool.
| Elgg\Cache\Pool::invalidate | ( | $key | ) | 
Forcefully invalidates the value associated with the given key.
Implementations must:
| string | int | $key | A plain string ID for the cache entry to invalidate. | 
Implemented in Elgg\Cache\StashPool, Elgg\Cache\NullPool, and Elgg\Cache\MemoryPool.
| Elgg\Cache\Pool::put | ( | $key, | |
| $value | |||
| ) | 
Prime the cache to a specific value.
This is useful when the value was calculated by some out-of-band means. For example, when a list of rows is fetched from the database, you can prime the cache for each individual result.
| string | int | $key | A plain string ID for the cache entry | 
| mixed | $value | The cache value | 
Implemented in Elgg\Cache\StashPool, Elgg\Cache\NullPool, and Elgg\Cache\MemoryPool.