Go to the documentation of this file.
45 if ( !isset(
$params[
'caches'] ) ) {
46 throw new MWException( __METHOD__ .
': the caches parameter is required' );
49 $this->caches =
array();
50 foreach (
$params[
'caches']
as $cacheInfo ) {
67 public function get( $key, &$casToken = null ) {
68 foreach ( $this->caches
as $cache ) {
84 public function cas( $casToken, $key,
$value, $exptime = 0 ) {
85 throw new MWException(
"CAS is not implemented in " . __CLASS__ );
94 public function set( $key,
$value, $exptime = 0 ) {
103 public function delete( $key,
$time = 0 ) {
150 public function lock( $key, $timeout = 0 ) {
152 if ( isset( $this->caches[0] ) ) {
153 return $this->caches[0]->lock( $key, $timeout );
164 if ( isset( $this->caches[0] ) ) {
165 return $this->caches[0]->unlock( $key );
178 public function merge( $key, closure $callback, $exptime = 0, $attempts = 10 ) {
179 return $this->
doWrite(
'merge', $key, $callback, $exptime );
183 return isset( $this->caches[0] ) ? $this->caches[0]->getLastError() :
self::ERR_NONE;
187 if ( isset( $this->caches[0] ) ) {
188 $this->caches[0]->clearLastError();
198 $args = func_get_args();
199 array_shift(
$args );
201 foreach ( $this->caches
as $cache ) {
219 foreach ( $this->caches
as $cache ) {
220 if (
$cache->deleteObjectsExpiringBefore( $date, $progressCallback ) ) {
see documentation in includes Linker php for Linker::makeImageLink & $time
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
cas( $casToken, $key, $value, $exptime=0)
getLastError()
Get the "last error" registered; clearLastError() should be called manually.
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses & $ret
clearLastError()
Clear the "last error" registry.
interface is intended to be more or less compatible with the PHP memcached client.
const ERR_NONE
Possible values for getLastError()
add( $key, $value, $exptime=0)
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
deleteObjectsExpiringBefore( $date, $progressCallback=false)
Delete objects expiring before a certain date.
__construct( $params)
Constructor.
A cache class that replicates all writes to multiple child caches.
merge( $key, closure $callback, $exptime=0, $attempts=10)
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
static newFromParams( $params)
Create a new cache object from parameters.
replace( $key, $value, $exptime=0)