function MemoryBackend::invalidate
Marks a cache item as invalid.
Invalid items may be returned in later calls to get(), if the $allow_invalid argument is TRUE.
Parameters
string $cid: The cache ID to invalidate.
Overrides CacheBackendInterface::invalidate
2 calls to MemoryBackend::invalidate()
- LruMemoryCache::invalidateMultiple in core/
lib/ Drupal/ Core/ Cache/ MemoryCache/ LruMemoryCache.php - Marks cache items as invalid.
- LruMemoryCache::invalidateTags in core/
lib/ Drupal/ Core/ Cache/ MemoryCache/ LruMemoryCache.php - Marks cache items with any of the specified tags as invalid.
1 method overrides MemoryBackend::invalidate()
- LruMemoryCache::invalidate in core/
lib/ Drupal/ Core/ Cache/ MemoryCache/ LruMemoryCache.php - Marks a cache item as invalid.
File
-
core/
lib/ Drupal/ Core/ Cache/ MemoryBackend.php, line 161
Class
- MemoryBackend
- Defines a memory cache implementation.
Namespace
Drupal\Core\CacheCode
public function invalidate($cid) {
if (isset($this->cache[$cid])) {
$this->cache[$cid]->expire = $this->time
->getRequestTime() - 1;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.