CacheTagsInvalidatorInterface.php 604 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace Drupal\Core\Cache;
  3. /**
  4. * Defines required methods for classes wanting to handle cache tag changes.
  5. *
  6. * Services that implement this interface must add the cache_tags_invalidator
  7. * tag to be notified. Cache backends may implement this interface as well, they
  8. * will be notified automatically.
  9. *
  10. * @ingroup cache
  11. */
  12. interface CacheTagsInvalidatorInterface {
  13. /**
  14. * Marks cache items with any of the specified tags as invalid.
  15. *
  16. * @param string[] $tags
  17. * The list of tags for which to invalidate cache items.
  18. */
  19. public function invalidateTags(array $tags);
  20. }