Created
September 1, 2016 15:00
-
-
Save init90/0c9b6a5aa98b8c392e2447d3d5c793ad to your computer and use it in GitHub Desktop.
Drupal 8, get cache tags.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// from entity | |
$tags = \Drupal::entityTypeManager()->getStorage('job')->load(1)->getCacheTags(); | |
// from views | |
$tags = \Drupal\views\Entity\View::load('front')->getCacheTags(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment