Timeline for How can I disallow blocks and views from being cached by render cache?
Current License: CC BY-SA 4.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 7 at 11:59 | comment | added | 4uk4 | Another method to merge cacheable metadata of objects \Drupal::service('renderer')->addCacheableDependency($variables, $node); | |
| May 7 at 10:08 | comment | added | Alimba | I have updated the code, based on the comments you provided. I had to add a condition for the $variables['#cache']['tags'] because it wasn't always available and then it would cause the mergeTags to fail. However, still it will not work, same exact issue, like nothing has changed. | |
| May 7 at 9:56 | comment | added | Clive♦ | @Alimba Always merge - the Views module may add some default caching at some point in the future, and you'd end up removing it otherwise | |
| May 7 at 8:35 | comment | added | Alimba | That may have worked, but it seems $variables['#cache']['tags'] is empty inside the mytheme_preprocess_views_view. I wonder if I don't merge tags but just add them. | |
| May 7 at 6:44 | history | edited | Hudri | CC BY-SA 4.0 | added 4 characters in body |
| May 6 at 17:18 | history | answered | Hudri | CC BY-SA 4.0 |