You are here

public function OembedProvidersCacheTagInvalidator::invalidateTags in oEmbed Providers 1.1.x

Same name and namespace in other branches
  1. 2.x src/Cache/OembedProvidersCacheTagInvalidator.php \Drupal\oembed_providers\Cache\OembedProvidersCacheTagInvalidator::invalidateTags()
  2. 1.0.x src/Cache/OembedProvidersCacheTagInvalidator.php \Drupal\oembed_providers\Cache\OembedProvidersCacheTagInvalidator::invalidateTags()

Marks cache items with any of the specified tags as invalid.

Parameters

string[] $tags: The list of tags for which to invalidate cache items.

Overrides CacheTagsInvalidatorInterface::invalidateTags

File

src/Cache/OembedProvidersCacheTagInvalidator.php, line 33

Class

OembedProvidersCacheTagInvalidator
Intercepts requests for cache tag invalidation.

Namespace

Drupal\oembed_providers\Cache

Code

public function invalidateTags(array $tags) {

  // Whenever our settings change, clear media source plugin definitions so
  // \oembed_providers_media_source_info_alter() may be re-executed.
  if (in_array('config:oembed_providers.settings', $tags, TRUE)) {
    $this->mediaSourceManager
      ->clearCachedDefinitions();
  }
}