Snc\RedisBundle\Profiler\Storage\RedisProfilerStorage::setValue PHP Method

setValue() protected method

Stores an item on the Redis server under the specified key.
protected setValue ( string $key, mixed $value, integer $expiration, integer $serializer = self::REDIS_SERIALIZER_NONE ) : boolean
$key string
$value mixed
$expiration integer
$serializer integer
return boolean
    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);
    }