Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have a view that uses a block display that i am rendering on a node for which i have created a custom tag that uses the argument from the URL - result:{{ argument_nid }}. Then on a node_presave I invalidate tag - result:102. The tag is present on the node. I can see it this cache tag in the headers on the node, but the view still doesn't get re-rendered.
I dont know if this is a problem with this specific module or drupal caching in general.
Comments
Comment #2
MaskOta CreditAttribution: MaskOta commentedAfter more investigation it seems that the problem is the data cache not the render cache. Any way to get around that?
Comment #3
BerdirThe cache tags added by this should be added to both the query and the render cache.
Comment #4
MaskOta CreditAttribution: MaskOta commentedI rechecked and you are completely right.
The view doesn't get rebuilt afeter invalidating the custom tag tho. Any suggestions?
Comment #5
BerdirNot sure, but I'd start by validating that your view has the correct cache tags by looking at the tags column in the database, and that your invalidation is really working as expected by checking the invalidation counter in the cache tags table.
Comment #6
mstef CreditAttribution: mstef at FFW commentedI'm experiencing this too. Looking at the cache_render table for the block (not the view), I see the unprocessed custom cache tag in there (it contains the {{ argument.some_value }} token.
EDIT: It actually contains the processed and unprocessed tags... so it should be working.