* @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
*/
/**
* Get the underlying client object. This is provided for debugging
* purposes.
- * @return BagOStuff
+ * @return MemcachedClient|Memcached
*/
public function getClient() {
return $this->client;
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 ) {