dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't fallback from uk to ru
[lhc/web/wiklou.git]
/
includes
/
objectcache
/
MemcachedPeclBagOStuff.php
diff --git
a/includes/objectcache/MemcachedPeclBagOStuff.php
b/includes/objectcache/MemcachedPeclBagOStuff.php
index
b7d1eaf
..
bb760bd
100644
(file)
--- a/
includes/objectcache/MemcachedPeclBagOStuff.php
+++ b/
includes/objectcache/MemcachedPeclBagOStuff.php
@@
-43,7
+43,7
@@
class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
* values, but serialization is much slower unless the php.ini option
* igbinary.compact_strings is off.
* @param array $params
* values, but serialization is much slower unless the php.ini option
* igbinary.compact_strings is off.
* @param array $params
- * @throws
MW
Exception
+ * @throws
InvalidArgument
Exception
*/
function __construct( $params ) {
parent::__construct( $params );
*/
function __construct( $params ) {
parent::__construct( $params );
@@
-89,7
+89,7
@@
class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
// is as good as any. There's no way to configure libmemcached to use
// hashes identical to the ones currently in use by the PHP client, and
// even implementing one of the libmemcached hashes in pure PHP for
// is as good as any. There's no way to configure libmemcached to use
// hashes identical to the ones currently in use by the PHP client, and
// even implementing one of the libmemcached hashes in pure PHP for
- // forwards compatibility would require M
WMemcached
::get_sock() to be
+ // forwards compatibility would require M
emcachedClient
::get_sock() to be
// rewritten.
$this->client->setOption( Memcached::OPT_LIBKETAMA_COMPATIBLE, true );
// rewritten.
$this->client->setOption( Memcached::OPT_LIBKETAMA_COMPATIBLE, true );
@@
-112,7
+112,7
@@
class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
__CLASS__ . ': invalid value for serializer parameter'
);
}
__CLASS__ . ': invalid value for serializer parameter'
);
}
- $servers =
array()
;
+ $servers =
[]
;
foreach ( $params['servers'] as $host ) {
$servers[] = IP::splitHostAndPort( $host ); // (ip, port)
}
foreach ( $params['servers'] as $host ) {
$servers[] = IP::splitHostAndPort( $host ); // (ip, port)
}
@@
-189,7
+189,7
@@
class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
break;
default:
$msg = $this->client->getResultMessage();
break;
default:
$msg = $this->client->getResultMessage();
- $logCtx =
array()
;
+ $logCtx =
[]
;
if ( $key !== false ) {
$server = $this->client->getServerByKey( $key );
$logCtx['memcached-server'] = "{$server['host']}:{$server['port']}";
if ( $key !== false ) {
$server = $this->client->getServerByKey( $key );
$logCtx['memcached-server'] = "{$server['host']}:{$server['port']}";
@@
-209,7
+209,7
@@
class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
foreach ( $keys as $key ) {
$this->validateKeyEncoding( $key );
}
foreach ( $keys as $key ) {
$this->validateKeyEncoding( $key );
}
- $result = $this->client->getMulti( $keys ) ?:
array()
;
+ $result = $this->client->getMulti( $keys ) ?:
[]
;
return $this->checkResult( false, $result );
}
return $this->checkResult( false, $result );
}
@@
-226,4
+226,10
@@
class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
$result = $this->client->setMulti( $data, $this->fixExpiry( $exptime ) );
return $this->checkResult( false, $result );
}
$result = $this->client->setMulti( $data, $this->fixExpiry( $exptime ) );
return $this->checkResult( false, $result );
}
+
+ public function changeTTL( $key, $expiry = 0 ) {
+ $this->debugLog( "touch($key)" );
+ $result = $this->client->touch( $key, $expiry );
+ return $this->checkResult( $key, $result );
+ }
}
}