You are here

public function Redis_Cache_PhpRedis::setLastFlushTimeFor in Redis 7.3

File

lib/Redis/Cache/PhpRedis.php, line 8

Class

Redis_Cache_PhpRedis
Predis cache backend.

Code

public function setLastFlushTimeFor($time, $volatile = false) {
  $client = $this
    ->getClient();
  $key = $this
    ->getKey(self::LAST_FLUSH_KEY);
  if ($volatile) {
    $client
      ->hset($key, 'volatile', $time);
  }
  else {
    $client
      ->hmset($key, array(
      'permanent' => $time,
      'volatile' => $time,
    ));
  }
}