Semantic MediaWiki and related extensions
|
Public Member Functions | |
__construct (Cache $cache) | |
makeKey (... $params) | |
getStats () | |
contains ( $key) | |
fetch ( $key) | |
save ( $key, $value=null, $ttl=0) | |
delete ( $key) | |
fetchSub ( $key, $sub) | |
saveSub ( $key, $sub, $value=null, $ttl=0) | |
overrideSub ( $key, $sub, $value=null, $ttl=0) | |
deleteSub ( $key, $sub, $ttl=0) | |
associate ( $subject, $key) | |
invalidate ( $subject=null) | |
Static Public Member Functions | |
static | makeCacheKey (... $params) |
Public Attributes | |
const | CACHE_NAMESPACE = 'smw:entity' |
const | VERSION = 1 |
const | TTL_SECOND = 1 |
const | TTL_MINUTE = 60 |
const | TTL_HOUR = 3600 |
const | TTL_DAY = 86400 |
const | TTL_WEEK = 604800 |
const | TTL_MONTH = 2592000 |
const | TTL_YEAR = 31536000 |
Class provides a simple interface the link independent cache entries as associates (to a wikipage) hereby allowing them to be invalidated at once.
...Sub
methods provide a convenient support layer to extend or remove values from a cache entry.
GNU GPL v2+
SMW\EntityCache::__construct | ( | Cache | $cache | ) |
Cache | $cache |
SMW\EntityCache::associate | ( | $subject, | |
$key | |||
) |
Bind a cache key to a subject so that when a page gets flushed or modified, any associate keys can be invalidated at once.
DIWikiPage | Title | $subject |
SMW\EntityCache::contains | ( | $key | ) |
string | $key |
SMW\EntityCache::delete | ( | $key | ) |
string | $key |
SMW\EntityCache::deleteSub | ( | $key, | |
$sub, | |||
$ttl = 0 |
|||
) |
string | $key | |
string | $sub | |
integer | $ttl |
SMW\EntityCache::fetch | ( | $key | ) |
string | $key | |
mixed | $value |
SMW\EntityCache::fetchSub | ( | $key, | |
$sub | |||
) |
string | $key | |
mixed | $value |
SMW\EntityCache::getStats | ( | ) |
SMW\EntityCache::invalidate | ( | $subject = null | ) |
DIWikiPage | Title | $subject |
|
static |
string | array | $key |
SMW\EntityCache::makeKey | ( | $params | ) |
string | array | $key |
SMW\EntityCache::overrideSub | ( | $key, | |
$sub, | |||
$value = null , |
|||
$ttl = 0 |
|||
) |
string | $key | |
string | $sub | |
mixed | $value | |
integer | $ttl |
SMW\EntityCache::save | ( | $key, | |
$value = null , |
|||
$ttl = 0 |
|||
) |
string | $key | |
mixed | $value |
SMW\EntityCache::saveSub | ( | $key, | |
$sub, | |||
$value = null , |
|||
$ttl = 0 |
|||
) |
string | $key | |
string | $sub | |
mixed | $value | |
integer | $ttl |
const SMW\EntityCache::CACHE_NAMESPACE = 'smw:entity' |
Repository specific namespace
const SMW\EntityCache::TTL_SECOND = 1 |
TTLs