Merge "Remove unused methods and bogus method call in Title"
[lhc/web/wiklou.git] / includes / libs / objectcache / RedisBagOStuff.php
index 0ba9c3f..dd859ad 100644 (file)
@@ -106,15 +106,15 @@ class RedisBagOStuff extends BagOStuff {
                return $result;
        }
 
-       protected function doSet( $key, $value, $expiry = 0, $flags = 0 ) {
+       protected function doSet( $key, $value, $exptime = 0, $flags = 0 ) {
                list( $server, $conn ) = $this->getConnection( $key );
                if ( !$conn ) {
                        return false;
                }
-               $expiry = $this->convertToRelative( $expiry );
+               $ttl = $this->convertToRelative( $exptime );
                try {
-                       if ( $expiry ) {
-                               $result = $conn->setex( $key, $expiry, $this->serialize( $value ) );
+                       if ( $ttl ) {
+                               $result = $conn->setex( $key, $ttl, $this->serialize( $value ) );
                        } else {
                                // No expiry, that is very different from zero expiry in Redis
                                $result = $conn->set( $key, $this->serialize( $value ) );
@@ -146,7 +146,7 @@ class RedisBagOStuff extends BagOStuff {
                return $result;
        }
 
-       public function doGetMulti( array $keys, $flags = 0 ) {
+       protected function doGetMulti( array $keys, $flags = 0 ) {
                $batches = [];
                $conns = [];
                foreach ( $keys as $key ) {
@@ -185,7 +185,7 @@ class RedisBagOStuff extends BagOStuff {
                return $result;
        }
 
-       public function setMulti( array $data, $expiry = 0, $flags = 0 ) {
+       protected function doSetMulti( array $data, $expiry = 0, $flags = 0 ) {
                $batches = [];
                $conns = [];
                foreach ( $data as $key => $value ) {
@@ -229,7 +229,7 @@ class RedisBagOStuff extends BagOStuff {
                return $result;
        }
 
-       public function deleteMulti( array $keys, $flags = 0 ) {
+       protected function doDeleteMulti( array $keys, $flags = 0 ) {
                $batches = [];
                $conns = [];
                foreach ( $keys as $key ) {
@@ -325,7 +325,7 @@ class RedisBagOStuff extends BagOStuff {
                return $result;
        }
 
-       public function changeTTL( $key, $exptime = 0, $flags = 0 ) {
+       protected function doChangeTTL( $key, $exptime, $flags ) {
                list( $server, $conn ) = $this->getConnection( $key );
                if ( !$conn ) {
                        return false;
@@ -427,7 +427,7 @@ class RedisBagOStuff extends BagOStuff {
         * not. The safest response for us is to explicitly destroy the connection
         * object and let it be reopened during the next request.
         * @param RedisConnRef $conn
-        * @param Exception $e
+        * @param RedisException $e
         */
        protected function handleException( RedisConnRef $conn, $e ) {
                $this->setLastError( BagOStuff::ERR_UNEXPECTED );