function public function ProviderBase::resetCache

8.x-3.x ProviderBase.php public ProviderBase::resetCache()

Removes any cached data the CDN Provider may have.

Overrides ProviderInterface::resetCache

Class

ProviderBase
CDN Provider base class.

Namespace

Drupal\bootstrap\Plugin\Provider

Source src/Plugin/Provider/ProviderBase.php (line 526)

public function resetCache() {
  $this->getKeyValue()->deleteAll();
  $this->getKeyValueExpirable()->deleteAll();

  // Invalidate library info if this provider is the one currently used.
  if ($this->theme->getCdnProvider()->getPluginId() === $this->pluginId) {
    /** @var \Drupal\Core\Cache\CacheTagsInvalidatorInterface $invalidator */
    $invalidator = \Drupal::service('cache_tags.invalidator');
    $invalidator->invalidateTags(['library_info']);
  }
}