You are here

protected function MemoryBackend::getRequestTime in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Cache/MemoryBackend.php \Drupal\Core\Cache\MemoryBackend::getRequestTime()
  2. 10 core/lib/Drupal/Core/Cache/MemoryBackend.php \Drupal\Core\Cache\MemoryBackend::getRequestTime()

Wrapper method for REQUEST_TIME constant.

Return value

int

8 calls to MemoryBackend::getRequestTime()
MemoryBackend::invalidate in core/lib/Drupal/Core/Cache/MemoryBackend.php
Marks a cache item as invalid.
MemoryBackend::invalidateAll in core/lib/Drupal/Core/Cache/MemoryBackend.php
Marks all cache items as invalid.
MemoryBackend::invalidateMultiple in core/lib/Drupal/Core/Cache/MemoryBackend.php
Marks cache items as invalid.
MemoryBackend::invalidateTags in core/lib/Drupal/Core/Cache/MemoryBackend.php
Marks cache items with any of the specified tags as invalid.
MemoryBackend::prepareItem in core/lib/Drupal/Core/Cache/MemoryBackend.php
Prepares a cached item.

... See full list

File

core/lib/Drupal/Core/Cache/MemoryBackend.php, line 203

Class

MemoryBackend
Defines a memory cache implementation.

Namespace

Drupal\Core\Cache

Code

protected function getRequestTime() {
  return defined('REQUEST_TIME') ? REQUEST_TIME : (int) $_SERVER['REQUEST_TIME'];
}