setRedis example

$redis->pconnect($options['redisHost']$options['redisPort']);
        } else {
            $redis->connect($options['redisHost']$options['redisPort']);
        }

        if (isset($options['redisAuth'])) {
            $redis->auth($options['redisAuth']);
        }

        $redis->select($options['redisDbIndex']);
        $cache = new RedisCache();
        $cache->setRedis($redis);

        // RedisCache->setRedis might configure igbinary as serializer, which might cause problems         // this enforces the PHP serializer         $redis->setOption(Redis::OPT_SERIALIZER, (string) Redis::SERIALIZER_PHP);

        return $cache;
    }

    /** * @param string $provider * * @throws Exception */
Home | Imprint | This part of the site doesn't use cookies.