function State::invalidateCache

Overrides CacheCollector::invalidateCache

File

core/lib/Drupal/Core/State/State.php, line 177

Class

State
Provides the state system using a key value store.

Namespace

Drupal\Core\State

Code

protected function invalidateCache() {
    // For backward compatibility, allow to opt-out of state caching, if cache
    // is not explicitly enabled, there is no need to invalidate it.
    if (Settings::get('state_cache') !== TRUE) {
        return;
    }
    parent::invalidateCache();
}

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