CacheCollector::set

public function CacheCollector::set

public CacheCollector::set($key, $value)

Implements \Drupal\Core\Cache\CacheCollectorInterface::set().

This is not persisted by default. In practice this means that setting a value will only apply while the object is in scope and will not be written back to the persistent cache. This follows a similar pattern to static vs. persistent caching in procedural code. Extending classes may wish to alter this behavior, for example by adding a call to persist().

Overrides 登录查看完整内容