Renamed new BagOStuff getBatch() function to getMulti() for consistency.
authorAaron Schulz <aschulz@wikimedia.org>
Tue, 15 May 2012 08:48:22 +0000 (01:48 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 15 May 2012 08:48:22 +0000 (01:48 -0700)
Change-Id: Icfe673919f65192565aa114c165c90d97d33785a

includes/filerepo/backend/FileBackendStore.php
includes/objectcache/BagOStuff.php
includes/objectcache/MemcachedPeclBagOStuff.php
includes/objectcache/MemcachedPhpBagOStuff.php
includes/objectcache/SqlBagOStuff.php

index 1a7bd06..5f49b01 100644 (file)
@@ -1327,7 +1327,7 @@ abstract class FileBackendStore extends FileBackend {
 
                $contInfo = array(); // (resolved container name => cache value)
                // Get all cache entries for these container cache keys...
-               $values = $this->memCache->getBatch( array_keys( $contNames ) );
+               $values = $this->memCache->getMulti( array_keys( $contNames ) );
                foreach ( $values as $cacheKey => $val ) {
                        $contInfo[$contNames[$cacheKey]] = $val;
                }
@@ -1412,7 +1412,7 @@ abstract class FileBackendStore extends FileBackend {
                        }
                }
                // Get all cache entries for these container cache keys...
-               $values = $this->memCache->getBatch( array_keys( $pathNames ) );
+               $values = $this->memCache->getMulti( array_keys( $pathNames ) );
                foreach ( $values as $cacheKey => $val ) {
                        if ( is_array( $val ) ) {
                                $this->trimCache(); // limit memory
index 4b06256..2b26640 100644 (file)
@@ -66,7 +66,7 @@ abstract class BagOStuff {
         * @param $keys Array List of strings
         * @return Array
         */
-       public function getBatch( array $keys ) {
+       public function getMulti( array $keys ) {
                $res = array();
                foreach ( $keys as $key ) {
                        $res[$key] = $this->get( $key );
index 2f88407..c3ba9ea 100644 (file)
@@ -192,8 +192,8 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
         * @param $keys Array
         * @return Array
         */
-       public function getBatch( array $keys ) {
-               $this->debugLog( 'getBatch(' . implode( ', ', $keys ) . ')' );
+       public function getMulti( array $keys ) {
+               $this->debugLog( 'getMulti(' . implode( ', ', $keys ) . ')' );
                $callback = array( $this, 'encodeKey' );
                $result = $this->client->getMulti( array_map( $callback, $keys ) );
                return $this->checkResult( false, $result );
index eefbb17..c562134 100644 (file)
@@ -60,7 +60,7 @@ class MemcachedPhpBagOStuff extends MemcachedBagOStuff {
         * @param $keys Array
         * @return Array
         */
-       public function getBatch( array $keys ) {
+       public function getMulti( array $keys ) {
                $callback = array( $this, 'encodeKey' );
                return $this->client->get_multi( array_map( $callback, $keys ) );
        }
index 54a67e0..e504887 100644 (file)
@@ -139,11 +139,11 @@ class SqlBagOStuff extends BagOStuff {
        }
 
        public function get( $key ) {
-               $values = $this->getBatch( array( $key ) );
+               $values = $this->getMulti( array( $key ) );
                return $values[$key];
        }
 
-       public function getBatch( array $keys ) {
+       public function getMulti( array $keys ) {
                $values = array(); // array of (key => value)
 
                $keysByTableName = array();