From: Matthias Mullie Date: Wed, 24 Apr 2013 07:54:53 +0000 (+0200) Subject: Docs for Redis' ->exec() return value X-Git-Tag: 1.31.0-rc.0~19888 X-Git-Url: https://git.cyclocoop.org/%7B%7B%20url_for%28?a=commitdiff_plain;h=edf169b44836ad9e778f787eb5fc414a40b058fe;p=lhc%2Fweb%2Fwiklou.git 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 --- 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;