protected function setValue($key, $value, $expiration = 0, $serializer = self::REDIS_SERIALIZER_NONE)
    {
        if (self::REDIS_SERIALIZER_PHP === $serializer) {
            $value = serialize($value);
        }

        return $this->redis->setex($key, $expiration, $value);
    }
protected function setValue($key, $value, $expiration = 0, $serializer = self::REDIS_SERIALIZER_NONE)
    {
        if (self::REDIS_SERIALIZER_PHP === $serializer) {
            $value = serialize($value);
        }

        return $this->redis->setex($key, $expiration, $value);
    }
protected function setValue ( $ key , $ value , $ expiration = 0 , $ serializer = self :: REDIS_SERIALIZER_NONE ) { if ( self :: REDIS_SERIALIZER_PHP === $ serializer ) { $ value = serialize ( $ value ) ; } return $ this -> redis -> setex ( $ key , $ expiration , $ value ) ; }
Stores an item on the Redis server under the specified key.

@param string $key
@param mixed  $value
@param int    $expiration
@param int    $serializer

@return bool
Stores an item on the Redis server under the specified key .