Allow having no serializer in RedisConnectionPool.
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 13 Mar 2013 21:28:06 +0000 (14:28 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 13 Mar 2013 21:28:28 +0000 (14:28 -0700)
Change-Id: If367c26b6b19374d1445c406851e2c5d3e5cc634

includes/clientpool/RedisConnectionPool.php

index 2d6df0e..5c7c4f2 100644 (file)
@@ -62,7 +62,7 @@ class RedisConnectionPool {
         *                      multiple web requests. False by default.
         *   - password       : The authentication password, will be sent to Redis in clear text.
         *                      Optional, if it is unspecified, no AUTH command will be sent.
-        *   - serializer     : Set to "php" or "igbinary". Default is "php".
+        *   - serializer     : Set to "php", "igbinary", or "none". Default is "php".
         * @param array $options
         */
        protected function __construct( array $options ) {
@@ -77,6 +77,8 @@ class RedisConnectionPool {
                        $this->serializer = Redis::SERIALIZER_PHP;
                } elseif ( $options['serializer'] === 'igbinary' ) {
                        $this->serializer = Redis::SERIALIZER_IGBINARY;
+               } elseif ( $options['serializer'] === 'none' ) {
+                       $this->serializer = Redis::SERIALIZER_NONE;
                } else {
                        throw new MWException( "Invalid serializer specified." );
                }