You are here

protected function ChainedFastBackend::getLastWriteTimestamp in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Cache/ChainedFastBackend.php \Drupal\Core\Cache\ChainedFastBackend::getLastWriteTimestamp()

Gets the last write timestamp.

2 calls to ChainedFastBackend::getLastWriteTimestamp()
ChainedFastBackend::getMultiple in core/lib/Drupal/Core/Cache/ChainedFastBackend.php
Returns data from the persistent cache when given an array of cache IDs.
ChainedFastBackend::markAsOutdated in core/lib/Drupal/Core/Cache/ChainedFastBackend.php
Marks the fast cache bin as outdated because of a write.

File

core/lib/Drupal/Core/Cache/ChainedFastBackend.php, line 289
Contains \Drupal\Core\Cache\ChainedFastBackend.

Class

ChainedFastBackend
Defines a backend with a fast and a consistent backend chain.

Namespace

Drupal\Core\Cache

Code

protected function getLastWriteTimestamp() {
  if ($this->lastWriteTimestamp === NULL) {
    $cache = $this->consistentBackend
      ->get(self::LAST_WRITE_TIMESTAMP_PREFIX . $this->bin);
    $this->lastWriteTimestamp = $cache ? $cache->data : 0;
  }
  return $this->lastWriteTimestamp;
}