function cache_delete_tags

Deletes items from all bins with any of the specified tags.

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

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

Parameters

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

1 call to cache_delete_tags()
views_invalidate_cache in drupal/core/modules/views/views.module
Invalidate the views cache, forcing a rebuild on the next grab of table data.

File

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

Code

function cache_delete_tags(array $tags) {
  foreach (CacheFactory::getBackends() as $bin => $class) {
    cache($bin)
      ->deleteTags($tags);
  }
}