$class) { cache($bin)->deleteTags($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. * * @param array $tags * The list of tags to invalidate cache items for. */ function cache_invalidate_tags(array $tags) { foreach (CacheFactory::getBackends() as $bin => $class) { cache($bin)->invalidateTags($tags); } }