MediaWiki  1.23.2
MemcachedPhpBagOStuff.php
Go to the documentation of this file.
1 <?php
30 
44  function __construct( $params ) {
46 
47  $this->client = new MemCachedClientforWiki( $params );
48  $this->client->set_servers( $params['servers'] );
49  $this->client->set_debug( $params['debug'] );
50  }
51 
55  public function setDebug( $debug ) {
56  $this->client->set_debug( $debug );
57  }
58 
63  public function getMulti( array $keys ) {
64  $callback = array( $this, 'encodeKey' );
65  return $this->client->get_multi( array_map( $callback, $keys ) );
66  }
67 
73  public function lock( $key, $timeout = 0 ) {
74  return $this->client->lock( $this->encodeKey( $key ), $timeout );
75  }
76 
81  public function unlock( $key ) {
82  return $this->client->unlock( $this->encodeKey( $key ) );
83  }
84 
90  public function incr( $key, $value = 1 ) {
91  return $this->client->incr( $this->encodeKey( $key ), $value );
92  }
93 
99  public function decr( $key, $value = 1 ) {
100  return $this->client->decr( $this->encodeKey( $key ), $value );
101  }
102 }
php
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
Definition: skin.txt:62
MemcachedBagOStuff
Base class for memcached clients.
Definition: MemcachedBagOStuff.php:29
MemcachedBagOStuff\applyDefaultParams
applyDefaultParams( $params)
Fill in the defaults for any parameters missing from $params, using the backwards-compatible global v...
Definition: MemcachedBagOStuff.php:36
MemcachedPhpBagOStuff\__construct
__construct( $params)
Constructor.
Definition: MemcachedPhpBagOStuff.php:44
MemcachedPhpBagOStuff
A wrapper class for the pure-PHP memcached client, exposing a BagOStuff interface.
Definition: MemcachedPhpBagOStuff.php:29
$params
$params
Definition: styleTest.css.php:40
MemcachedPhpBagOStuff\lock
lock( $key, $timeout=0)
Definition: MemcachedPhpBagOStuff.php:73
MemcachedPhpBagOStuff\setDebug
setDebug( $debug)
Definition: MemcachedPhpBagOStuff.php:55
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
MemcachedPhpBagOStuff\unlock
unlock( $key)
Definition: MemcachedPhpBagOStuff.php:81
MemcachedBagOStuff\encodeKey
encodeKey( $key)
Encode a key for use on the wire inside the memcached protocol.
Definition: MemcachedBagOStuff.php:128
$value
$value
Definition: styleTest.css.php:45
MemCachedClientforWiki
Definition: MemcachedClient.php:1237
MemcachedPhpBagOStuff\incr
incr( $key, $value=1)
Definition: MemcachedPhpBagOStuff.php:90
$debug
$debug
Definition: Setup.php:498
$keys
$keys
Definition: testCompression.php:63
MemcachedPhpBagOStuff\getMulti
getMulti(array $keys)
Definition: MemcachedPhpBagOStuff.php:63
MemcachedPhpBagOStuff\decr
decr( $key, $value=1)
Definition: MemcachedPhpBagOStuff.php:99