function CacheBackendDecorator::invalidate

Same name and namespace in other branches
  1. 10 core/modules/system/tests/modules/performance_test/src/Cache/CacheBackendDecorator.php \Drupal\performance_test\Cache\CacheBackendDecorator::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

File

core/modules/system/tests/modules/performance_test/src/Cache/CacheBackendDecorator.php, line 119

Class

CacheBackendDecorator
Wraps an existing cache backend to track calls to the cache backend.

Namespace

Drupal\performance_test\Cache

Code

public function invalidate($cid) {
  $start = microtime(TRUE);
  $this->cacheBackend
    ->invalidate($cid);
  $stop = microtime(TRUE);
  $this->logCacheOperation($cid, $start, $stop, 'invalidate');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.