diff options
Diffstat (limited to 'includes/objectcache/MemcachedPeclBagOStuff.php')
-rw-r--r-- | includes/objectcache/MemcachedPeclBagOStuff.php | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/includes/objectcache/MemcachedPeclBagOStuff.php b/includes/objectcache/MemcachedPeclBagOStuff.php index f2c49281..1b2c8db6 100644 --- a/includes/objectcache/MemcachedPeclBagOStuff.php +++ b/includes/objectcache/MemcachedPeclBagOStuff.php @@ -115,12 +115,7 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff { $this->client->addServers( $servers ); } - /** - * @param string $key - * @param float $casToken [optional] - * @return mixed - */ - public function get( $key, &$casToken = null ) { + public function get( $key, &$casToken = null, $flags = 0 ) { $this->debugLog( "get($key)" ); $result = $this->client->get( $this->encodeKey( $key ), null, $casToken ); $result = $this->checkResult( $key, $result ); @@ -238,15 +233,16 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff { return $result; } - /** - * @param array $keys - * @return array - */ - public function getMulti( array $keys ) { + public function getMulti( array $keys, $flags = 0 ) { $this->debugLog( 'getMulti(' . implode( ', ', $keys ) . ')' ); $callback = array( $this, 'encodeKey' ); - $result = $this->client->getMulti( array_map( $callback, $keys ) ); - $result = $result ?: array(); // must be an array + $encodedResult = $this->client->getMulti( array_map( $callback, $keys ) ); + $encodedResult = $encodedResult ?: array(); // must be an array + $result = array(); + foreach ( $encodedResult as $key => $value ) { + $key = $this->decodeKey( $key ); + $result[$key] = $value; + } return $this->checkResult( false, $result ); } |