MediaWiki
REL1_22
|
Handles per process caching of items. More...
Public Member Functions | |
__construct ($maxKeys) | |
clear ($keys=null) | |
Clear one or several cache entries, or all cache entries. | |
get ($key, $prop) | |
Get a property field for a cache entry. | |
has ($key, $prop, $maxAge=0) | |
Check if a property field exists for a cache entry. | |
set ($key, $prop, $value) | |
Set a property field for a cache entry. | |
Protected Member Functions | |
ping ($key) | |
Push an entry to the top of the cache. | |
Protected Attributes | |
Array | $cache = array() |
* | |
Array | $cacheTimes = array() |
* | |
$maxCacheKeys |
Handles per process caching of items.
Definition at line 28 of file ProcessCacheLRU.php.
ProcessCacheLRU::__construct | ( | $ | maxKeys | ) |
$maxKeys | integer Maximum number of entries allowed (min 1). |
MWException | When $maxCacheKeys is not an int or =< 0. |
Definition at line 38 of file ProcessCacheLRU.php.
ProcessCacheLRU::clear | ( | $ | keys = null | ) |
Clear one or several cache entries, or all cache entries.
$keys | string|Array |
Definition at line 107 of file ProcessCacheLRU.php.
ProcessCacheLRU::get | ( | $ | key, |
$ | prop | ||
) |
Get a property field for a cache entry.
This returns null if the property is not set. If the item is already set, it will be pushed to the top of the cache.
$key | string |
$prop | string |
Definition at line 92 of file ProcessCacheLRU.php.
ProcessCacheLRU::has | ( | $ | key, |
$ | prop, | ||
$ | maxAge = 0 |
||
) |
Check if a property field exists for a cache entry.
$key | string |
$prop | string |
$maxAge | integer Ignore items older than this many seconds (since 1.21) |
Definition at line 76 of file ProcessCacheLRU.php.
ProcessCacheLRU::ping | ( | $ | key | ) | [protected] |
Push an entry to the top of the cache.
$key | string |
Definition at line 124 of file ProcessCacheLRU.php.
ProcessCacheLRU::set | ( | $ | key, |
$ | prop, | ||
$ | value | ||
) |
Set a property field for a cache entry.
This will prune the cache if it gets too large based on LRU. If the item is already set, it will be pushed to the top of the cache.
$key | string |
$prop | string |
$value | mixed |
Definition at line 55 of file ProcessCacheLRU.php.
Array ProcessCacheLRU::$cacheTimes = array() [protected] |
*
Definition at line 30 of file ProcessCacheLRU.php.
ProcessCacheLRU::$maxCacheKeys [protected] |
Definition at line 32 of file ProcessCacheLRU.php.