Appends data to an existing item on the Redis server.
string $key:
string $value:
int $expiration:
Boolean
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);
}