function cache_invalidate_tags

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

Many sites have more than one active cache backend, and each backend my use a different strategy for storing tags against cache items, and invalidating cache items associated with a given tag.

When invalidating a given list of tags, we iterate over each cache backend, and call invalidateTags() on each.

Parameters

array $tags: The list of tags to invalidate cache items for.

25 calls to cache_invalidate_tags()
BlockCacheTest::testCachePerRole in drupal/core/modules/block/lib/Drupal/block/Tests/BlockCacheTest.php
Test DRUPAL_CACHE_PER_ROLE.
BlockFormController::submit in drupal/core/modules/block/lib/Drupal/block/BlockFormController.php
Overrides \Drupal\Core\Entity\EntityFormController::submit().
BlockListController::submitForm in drupal/core/modules/block/lib/Drupal/block/BlockListController.php
Implements \Drupal\Core\Form\FormInterface::submitForm().
CommentBlockTest::testRecentCommentBlock in drupal/core/modules/comment/lib/Drupal/comment/Tests/CommentBlockTest.php
Tests the recent comments block.
CommentFormController::save in drupal/core/modules/comment/lib/Drupal/comment/CommentFormController.php
Overrides Drupal\Core\Entity\EntityFormController::save().

... See full list

1 string reference to 'cache_invalidate_tags'
_menu_clear_page_cache in drupal/core/includes/menu.inc
Clears the page and block caches at most twice per page load.

File

drupal/core/includes/cache.inc, line 48
Functions and interfaces for cache handling.

Code

function cache_invalidate_tags(array $tags) {
  Cache::invalidateTags($tags);
}