Method |
Description |
|
appendCallback ( callable $callback ) : boolean |
Appends a callback to the current start()/end() cache |
|
clean ( CacheKey $k ) : boolean |
Cleans cache: all entries with a certain $base and $id in the $key
are deleted. |
|
cleanP ( $base, $id ) : boolean |
Cleans cache: all entries with a certain $base and $id |
|
clear ( ) |
Clears entire cache. Use sparingly. |
|
clearAll ( ) |
Clears all cache classes. |
|
cssDebug ( ) |
Renders CSS for live view debugging of cached data. |
|
delete ( CacheKey $k ) : boolean |
Deletes an entry from the cache |
|
deleteP ( string $base, string $id, mixed $sub = null ) |
|
|
disable ( ) : CacheAbstract |
Disable this cache |
|
dumpSummary ( ) |
Dumps a short HTML summary of the cache hits/misses |
|
enable ( ) : CacheAbstract |
Enable this cache |
|
end ( $print = true ) |
Ends the cache start(). |
|
factory ( string $backend ) : CacheAbstract |
Returns a cache |
|
footerDebug ( ) |
Extensive footer debug code. Shows which parts of the HTML were
cached or missed visually. Great! |
|
get ( CacheKey $k ) : mixed |
Get cached entry. |
|
getData ( CacheKey $k ) : CacheData |
Same as get, but assumes data was stored with a CacheData object
and will treat it accordingly. |
|
getDataP ( string $base, string $id, mixed $sub = null ) |
Same as getData(), but expanded parameters. |
|
getDefaultLifetime ( ) |
|
|
getLogSummary ( ) : array() |
Returns basic cache statistics. See $summary. |
|
getMulti ( array $cacheid, callable $callback = null ) : array:mixed |
Gets data from multiple cache keys at once |
|
getNamespace ( ) : string |
|
|
getP ( string $base, string $id, mixed $sub = null ) : mixed |
Same as get(), but expanded parameters. |
|
increment ( integer $value, CacheKey $k, integer $default ) : integer |
Increment a variable. Backend deals with this, but in general this is atomic. |
|
invalidate ( CacheKey $k ) |
Invalidates a dependency index. If the index does not exist it is created. |
|
isEnabled ( ) : True |
|
|
logHigh ( $message ) |
High level log for testing and debugging |
|
newEnd ( $print = true ) |
|
|
newstart ( CacheKey $k, $lifetime = null, $fail = false ) |
|
|
prefetch ( array $data ) |
Prefetches data which will be used. This avoids multiple trips to the cache
server if they can be avoided. |
|
recursiveEnd ( boolean $print = true ) : string |
|
|
recursiveStart ( CacheKey $k, integer $lifetime = null, boolean $print = true, boolean $fail = false ) : string |
|
|
recursiveStartP ( $base, $id, $sub = null, $lifetime = null, $print = true, $fail = false ) |
|
|
report ( ) |
Generates a report for this backend |
|
resetLogSummary ( ) |
|
|
setDefaultLifetime ( number $lifetime ) |
|
|
setEnabled ( $b ) : CacheAbstract |
Enable this cache |
|
setLog ( boolean $b ) : CacheAbstract |
|
|
setNamespace ( string $name ) |
|
|
start ( CacheKey $k, string $lifetime = null, boolean $print = true, boolean $fail = false ) : boolean | string |
Starts a cache if it doesn't exist, or outputs the data and returns true. |
|
startCallback ( CacheKey $k, callable $c, array $cparams = [], integer $lifetime = null ) |
start() using a callable. Same as start()/c()/end(). |
|
startP ( $base, $id, $sub = null, $lifetime = null, $print = true, $fail = false ) |
|
|
store ( mixed $data, CacheKey $k, integer $lifetime ) : boolean |
Saves data in cache. |
|
storeData ( CacheData $data, number $lifetime ) : boolean |
Same as store() but expanded parameters |
|
storeP ( mixed $data, string $base, string $id, string $sub = null, number $lifetime ) : boolean |
Same as store() but expanded parameters |
|