objectcache: make sure variant keys are namespaced as keys should be
authorAaron Schulz <aschulz@wikimedia.org>
Mon, 20 Nov 2017 07:27:34 +0000 (23:27 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Mon, 20 Nov 2017 20:32:44 +0000 (20:32 +0000)
Change-Id: I02597d6dbc2febace25ef6d1981f69dc704efe8d

includes/libs/objectcache/WANObjectCache.php

index 73e4a9a..f2048fe 100644 (file)
@@ -917,7 +917,7 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
                                        // 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