objectcache: define makeKey()/makeGlobalKey() for ReplicatedBagOStuff
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 27 Jun 2018 08:16:11 +0000 (09:16 +0100)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 27 Jun 2018 14:16:01 +0000 (14:16 +0000)
Proxy to the "master"/"write" cache object method. This is similar to the
approach taken in MultiWriteBagOStuff

Bug: T198279
Change-Id: If0933246b7ef4fc07ebeec4c3c9625b1137dbe05

includes/libs/objectcache/ReplicatedBagOStuff.php

index 56b6e0e..1c14f7c 100644 (file)
@@ -128,4 +128,12 @@ class ReplicatedBagOStuff extends BagOStuff {
                $this->writeStore->clearLastError();
                $this->readStore->clearLastError();
        }
+
+       public function makeKey( $class, $component = null ) {
+               return $this->writeStore->makeKey( ...func_get_args() );
+       }
+
+       public function makeGlobalKey( $class, $component = null ) {
+               return $this->writeStore->makeGlobalKey( ...func_get_args() );
+       }
 }