summaryrefslogtreecommitdiffstats
path: root/core/lib/Drupal/Core/Render
diff options
context:
space:
mode:
authorGabor Hojtsy2017-10-09 16:50:18 (GMT)
committerGabor Hojtsy2017-10-09 16:50:18 (GMT)
commit0d239c45bcb3f3276bbf4a59f17514239a7e8724 (patch)
tree7c7c5bcdf982380912e0fa7bdebbce2014c68ea3 /core/lib/Drupal/Core/Render
parent17bf4688b23bea8eb3b6467aa4a459d8ed600a6f (diff)
Issue #2877480 by Yogesh Pawar, hardik.p, eojthebrave, Cyberschorsch: Update #cache example code on Render API overview to use Node::getCacheTags instead of hard coding
Diffstat (limited to 'core/lib/Drupal/Core/Render')
-rw-r--r--core/lib/Drupal/Core/Render/theme.api.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/lib/Drupal/Core/Render/theme.api.php b/core/lib/Drupal/Core/Render/theme.api.php
index c12dd3d..f91411b 100644
--- a/core/lib/Drupal/Core/Render/theme.api.php
+++ b/core/lib/Drupal/Core/Render/theme.api.php
@@ -364,7 +364,7 @@
* '#cache' => [
* 'keys' => ['entity_view', 'node', $node->id()],
* 'contexts' => ['languages'],
- * 'tags' => ['node:' . $node->id()],
+ * 'tags' => $node->getCacheTags(),
* 'max-age' => Cache::PERMANENT,
* ],
* @endcode