Docs for Redis' ->exec() return value
authorMatthias Mullie <git@mullie.eu>
Wed, 24 Apr 2013 07:54:53 +0000 (09:54 +0200)
committerMatthias Mullie <git@mullie.eu>
Wed, 24 Apr 2013 08:00:02 +0000 (10:00 +0200)
I had to look up exactly why it'd return an array, figured someone else some day
might too

Change-Id: Iefb3a0f8292baf8846ed6a1b852432eb9daa92c2

includes/objectcache/RedisBagOStuff.php

index 1f64b69..e1dc42e 100644 (file)
@@ -140,6 +140,12 @@ class RedisBagOStuff extends BagOStuff {
                                $conn->setex( $key, $expiry, $value );
                        }
 
+                       /*
+                        * multi()/exec() (transactional mode) allows multiple values to
+                        * be set/get at once and will return an array of results, in
+                        * the order they were set/get. In this case, we only set 1
+                        * value, which should (in case of success) result in true.
+                        */
                        $result = ( $conn->exec() == array( true ) );
                } catch ( RedisException $e ) {
                        $result = false;