function CacheCollector::persist
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Cache/CacheCollector.php \Drupal\Core\Cache\CacheCollector::persist()
Flags an offset value to be written to the persistent cache.
Parameters
string $key: The key that was requested.
bool $persist: (optional) Whether the offset should be persisted or not, defaults to TRUE. When called with $persist = FALSE the offset will be unflagged so that it will not be written at the end of the request.
1 call to CacheCollector::persist()
- LocaleLookup::resolveCacheMiss in core/
modules/ locale/ src/ LocaleLookup.php - Resolves a cache miss.
File
-
core/
lib/ Drupal/ Core/ Cache/ CacheCollector.php, line 193
Class
- CacheCollector
- Default implementation for CacheCollectorInterface.
Namespace
Drupal\Core\CacheCode
protected function persist($key, $persist = TRUE) {
$this->keysToPersist[$key] = $persist;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.