* @param array $params
*/
function __construct( $params ) {
+ parent::__construct( $params );
$params = $this->applyDefaultParams( $params );
$this->client = new MemCachedClientforWiki( $params );
$this->client->set_debug( $debug );
}
- /**
- * @param array $keys
- * @return array
- */
- public function getMulti( array $keys ) {
+ public function getMulti( array $keys, $flags = 0 ) {
$callback = array( $this, 'encodeKey' );
- return $this->client->get_multi( array_map( $callback, $keys ) );
- }
-
- /**
- * @param string $key
- * @param int $timeout
- * @return bool
- */
- public function lock( $key, $timeout = 0 ) {
- return $this->client->lock( $this->encodeKey( $key ), $timeout );
- }
-
- /**
- * @param string $key
- * @return mixed
- */
- public function unlock( $key ) {
- return $this->client->unlock( $this->encodeKey( $key ) );
+ $encodedResult = $this->client->get_multi( array_map( $callback, $keys ) );
+ $result = array();
+ foreach ( $encodedResult as $key => $value ) {
+ $key = $this->decodeKey( $key );
+ $result[$key] = $value;
+ }
+ return $result;
}
/**