protected function ChainedFastBackend::getLastWriteTimestamp

protected ChainedFastBackend::getLastWriteTimestamp()

Gets the last write timestamp.

File

core/lib/Drupal/Core/Cache/ChainedFastBackend.php, line 292

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;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Cache!ChainedFastBackend.php/function/ChainedFastBackend::getLastWriteTimestamp/8.1.x