You are here

public function Redis_Cache_Predis::getLastFlushTime in Redis 7.3

File

lib/Redis/Cache/Predis.php, line 23

Class

Redis_Cache_Predis
Predis cache backend.

Code

public function getLastFlushTime() {
  $client = $this
    ->getClient();
  $key = $this
    ->getKey(self::LAST_FLUSH_KEY);
  $values = $client
    ->hmget($key, array(
    "permanent",
    "volatile",
  ));
  if (empty($values) || !is_array($values)) {
    $values = array(
      0,
      0,
    );
  }
  else {
    if (empty($values[0])) {
      $values[0] = 0;
    }
    if (empty($values[1])) {
      $values[1] = 0;
    }
  }
  return $values;
}