Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • thanks so should I do something like this: $build['#cache']['tags'] = $entity->getCacheTags(); in the above hook ? Commented Jun 20, 2015 at 5:30
  • No, not the entity. The entity cache tags are already there, that's not what you depend on. You depend on your configuration, so that's what you need. Exactly what's in the quoted text. However, I realized that the code example there is problematic, because you risk to overwrite existing cache tags. I'll update it based on what the documentation is using. Commented Jun 20, 2015 at 7:49