You are here

private function RedisProfilerStorage::setValue in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/http-kernel/Profiler/RedisProfilerStorage.php \Symfony\Component\HttpKernel\Profiler\RedisProfilerStorage::setValue()

Stores an item on the Redis server under the specified key.

Parameters

string $key:

mixed $value:

int $expiration:

int $serializer:

Return value

bool

1 call to RedisProfilerStorage::setValue()
RedisProfilerStorage::write in vendor/symfony/http-kernel/Profiler/RedisProfilerStorage.php
Saves a Profile.

File

vendor/symfony/http-kernel/Profiler/RedisProfilerStorage.php, line 352

Class

RedisProfilerStorage
RedisProfilerStorage stores profiling information in Redis.

Namespace

Symfony\Component\HttpKernel\Profiler

Code

private function setValue($key, $value, $expiration = 0, $serializer = self::REDIS_SERIALIZER_NONE) {
  $redis = $this
    ->getRedis();
  $redis
    ->setOption(self::REDIS_OPT_SERIALIZER, $serializer);
  return $redis
    ->setex($key, $expiration, $value);
}