private function RedisProfilerStorage::appendValue

Appends data to an existing item on the Redis server.

Parameters

string $key:

string $value:

int $expiration:

Return value

Boolean

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

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/RedisProfilerStorage.php, line 368

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);
}