CacheTagsInvalidatorInterface.php

Same filename and directory in other branches
  1. 8.9.x core/lib/Drupal/Core/Cache/CacheTagsInvalidatorInterface.php
  2. 10 core/lib/Drupal/Core/Cache/CacheTagsInvalidatorInterface.php
  3. 11.x core/lib/Drupal/Core/Cache/CacheTagsInvalidatorInterface.php

Namespace

Drupal\Core\Cache

File

core/lib/Drupal/Core/Cache/CacheTagsInvalidatorInterface.php

View source
<?php

namespace Drupal\Core\Cache;


/**
 * Defines required methods for classes wanting to handle cache tag changes.
 *
 * Services that implement this interface must add the cache_tags_invalidator
 * tag to be notified. Cache backends may implement this interface as well, they
 * will be notified automatically.
 *
 * @ingroup cache
 */
interface CacheTagsInvalidatorInterface {
    
    /**
     * Marks cache items with any of the specified tags as invalid.
     *
     * @param string[] $tags
     *   The list of tags for which to invalidate cache items.
     */
    public function invalidateTags(array $tags);

}

Interfaces

Title Deprecated Summary
CacheTagsInvalidatorInterface Defines required methods for classes wanting to handle cache tag changes.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.