X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Flibs%2Fobjectcache%2FMemcachedBagOStuff.php;h=7a362147246a736b1ed8bf1b3f53ff415189ed0d;hb=6a325346460c6de5b8edf315117cab92fc51b11b;hp=749c6d3acff250484f819bdccab2216462a9de34;hpb=ce5fc7150ffaae09001e832eb9f232ce875d9741;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/objectcache/MemcachedBagOStuff.php b/includes/libs/objectcache/MemcachedBagOStuff.php index 749c6d3acf..7a36214724 100644 --- a/includes/libs/objectcache/MemcachedBagOStuff.php +++ b/includes/libs/objectcache/MemcachedBagOStuff.php @@ -27,12 +27,12 @@ * @ingroup Cache */ class MemcachedBagOStuff extends BagOStuff { - /** @var MWMemcached|Memcached */ + /** @var MemcachedClient|Memcached */ protected $client; /** - * Fill in the defaults for any parameters missing from $params, using the - * backwards-compatible global variables + * Fill in some defaults for missing keys in $params. + * * @param array $params * @return array */ @@ -86,7 +86,7 @@ class MemcachedBagOStuff extends BagOStuff { /** * Get the underlying client object. This is provided for debugging * purposes. - * @return BagOStuff + * @return MemcachedClient|Memcached */ public function getClient() { return $this->client; @@ -103,8 +103,9 @@ class MemcachedBagOStuff extends BagOStuff { public function makeKeyInternal( $keyspace, $args ) { // Memcached keys have a maximum length of 255 characters. From that, // subtract the number of characters we need for the keyspace and for - // the separator character needed for each argument. - $charsLeft = 255 - strlen( $keyspace ) - count( $args ); + // the separator character needed for each argument. To handle some + // custom prefixes used by thing like WANObjectCache, limit to 205. + $charsLeft = 205 - strlen( $keyspace ) - count( $args ); $args = array_map( function ( $arg ) use ( &$charsLeft ) {