City-of-Bloomington / drupal-module-onboard

Drupal module for integration with OnBoard
GNU General Public License v2.0
0 stars 1 forks source link

Fix cache context declarations for blocks #29

Closed inghamn closed 6 years ago

inghamn commented 6 years ago

There are places in drupal where a node is rendered not in it's normal "view" context. For instance, displaying a revision for a node...

Our blocks need to be careful about declaring the cache context to avoid tripping over Drupal bugs.

https://github.com/City-of-Bloomington/drupal-customizations/issues/27

inghamn commented 6 years ago

We need to implement the ::getCacheContexts() function in order to prevent caching problems.