public static function Cache::invalidateTags

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.

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);
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Cache!Cache.php/function/Cache::invalidateTags/8.1.x