From edf169b44836ad9e778f787eb5fc414a40b058fe Mon Sep 17 00:00:00 2001 From: Matthias Mullie Date: Wed, 24 Apr 2013 09:54:53 +0200 Subject: [PATCH] Docs for Redis' ->exec() return value 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 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/includes/objectcache/RedisBagOStuff.php b/includes/objectcache/RedisBagOStuff.php index 1f64b69dcc..e1dc42e15b 100644 --- a/includes/objectcache/RedisBagOStuff.php +++ b/includes/objectcache/RedisBagOStuff.php @@ -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; -- 2.20.1