// Value existed before with a different version; use variant key.
// Reflect purges to $key by requiring that this key value be newer.
$value = $this->doGetWithSetCallback(
- 'cache-variant:' . md5( $key ) . ":$version",
+ $this->makeGlobalKey( 'WANCache-key-variant', md5( $key ), $version ),
$ttl,
$callback,
// Regenerate value if not newer than $key
/**
* @see BagOStuff::makeKey()
- * @param string $keys,... Key component (starting with a key collection name)
+ * @param string $class Key class
+ * @param string $component [optional] Key component (starting with a key collection name)
* @return string Colon-delimited list of $keyspace followed by escaped components of $args
* @since 1.27
*/
- public function makeKey() {
+ public function makeKey( $class, $component = null ) {
return call_user_func_array( [ $this->cache, __FUNCTION__ ], func_get_args() );
}
/**
* @see BagOStuff::makeGlobalKey()
- * @param string $keys,... Key component (starting with a key collection name)
+ * @param string $class Key class
+ * @param string $component [optional] Key component (starting with a key collection name)
* @return string Colon-delimited list of $keyspace followed by escaped components of $args
* @since 1.27
*/
- public function makeGlobalKey() {
+ public function makeGlobalKey( $class, $component = null ) {
return call_user_func_array( [ $this->cache, __FUNCTION__ ], func_get_args() );
}