Merge "objectcache: fix some makeKey/makeGlobalKey IDEA warnings"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 20 Nov 2017 20:51:26 +0000 (20:51 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 20 Nov 2017 20:51:26 +0000 (20:51 +0000)
1  2 
includes/libs/objectcache/WANObjectCache.php

@@@ -917,7 -917,7 +917,7 @@@ class WANObjectCache implements IExpiri
                                        // 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() );
        }