You are here

public function Redis_Cache::getLastFlushTime in Redis 7.3

Get latest flush time

Return value

string[] First value is the latest flush time for permanent entries checksum, second value is the latest flush time for volatile entries checksum.

3 calls to Redis_Cache::getLastFlushTime()
Redis_Cache::createEntryHash in lib/Redis/Cache.php
Create cache entry
Redis_Cache::get in lib/Redis/Cache.php
Returns data from the persistent cache.
Redis_Cache::getMultiple in lib/Redis/Cache.php
Returns data from the persistent cache when given an array of cache IDs.

File

lib/Redis/Cache.php, line 289

Class

Redis_Cache
Because those objects will be spawned during boostrap all its configuration must be set in the settings.php file.

Code

public function getLastFlushTime() {
  if (!$this->flushCache) {
    $this->flushCache = $this->backend
      ->getLastFlushTime();
  }

  // At the very first hit, we might not have the timestamps set, thus
  // we need to create them to avoid our entry being considered as
  // invalid
  if (!$this->flushCache[0]) {
    $this
      ->setLastFlushTime(true, true);
  }
  else {
    if (!$this->flushCache[1]) {
      $this
        ->setLastFlushTime(false, true);
    }
  }
  return $this->flushCache;
}