8.3.x Cache.php public static Cache::invalidateTags(array $tags)
8.0.x Cache.php public static Cache::invalidateTags(array $tags)
8.1.x Cache.php public static Cache::invalidateTags(array $tags)
8.2.x Cache.php public static Cache::invalidateTags(array $tags)
8.4.x Cache.php public static Cache::invalidateTags(array $tags)

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

Parameters

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

49 calls to Cache::invalidateTags()
AliasStorage::delete in core/lib/Drupal/Core/Path/AliasStorage.php
Deletes a URL alias.
AliasStorage::save in core/lib/Drupal/Core/Path/AliasStorage.php
Saves a path alias to the database.
Block::postSave in core/modules/block/src/Entity/Block.php
Acts on a saved entity before the insert or update hook is invoked.
BlockCacheTest::testCachePerRole in core/modules/block/src/Tests/BlockCacheTest.php
Test "user.roles" cache context.
BlockViewBuilderTest::testBlockViewBuilderViewAlter in core/modules/block/tests/src/Kernel/BlockViewBuilderTest.php
Tests block view altering.

... See full list

File

core/lib/Drupal/Core/Cache/Cache.php, line 144

Class

Cache
Helper methods for cache.

Namespace

Drupal\Core\Cache

Code

public static function invalidateTags(array $tags) {
  \Drupal::service('cache_tags.invalidator')->invalidateTags($tags);
}