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

MaskOta created an issue.

MaskOta’s picture

After more investigation it seems that the problem is the data cache not the render cache. Any way to get around that?

Berdir’s picture

The cache tags added by this should be added to both the query and the render cache.

MaskOta’s picture

I rechecked and you are completely right.

The view doesn't get rebuilt afeter invalidating the custom tag tho. Any suggestions?

Berdir’s picture

Not 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.

mstef’s picture

I'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.