You are here

private function RedisProfilerStorage::appendValue in Zircon Profile 8

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

Appends data to an existing item on the Redis server.

Parameters

string $key:

string $value:

int $expiration:

Return value

bool

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

File

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

Class

RedisProfilerStorage
RedisProfilerStorage stores profiling information in Redis.

Namespace

Symfony\Component\HttpKernel\Profiler

Code

private function appendValue($key, $value, $expiration = 0) {
  $redis = $this
    ->getRedis();
  $redis
    ->setOption(self::REDIS_OPT_SERIALIZER, self::REDIS_SERIALIZER_NONE);
  if ($redis
    ->exists($key)) {
    $redis
      ->append($key, $value);
    return $redis
      ->setTimeout($key, $expiration);
  }
  return $redis
    ->setex($key, $expiration, $value);
}