Both processed and unprocessed tags included in cache tag list

Created on 25 February 2020, almost 5 years ago
Updated 25 September 2024, 3 months ago

After setting a cache tag to use a contextual filter in a view, when checking the cache tags returned on page load both the processed and unprocessed tags are included in the cache tags header.

For example. If a view has a contextual filter of taxonomy term id (tid) and custom cache tag 'custom:{{ arguments.tid }}. When the view is loaded with the term id value of 5, then the X-Drupal-Cache-Tags header will have two values added, one called 'custom:5' and the other 'custom:{{ arugments.tid }}'.

Similar to what's reported in the last comment of this issue: https://www.drupal.org/project/views_custom_cache_tag/issues/2971568

I've raised this as a bug as according to the Cache Tags documentation here: https://www.drupal.org/docs/8/api/cache-api/cache-tags the tags cannot contain spaces (which views replacement tokens all contain). If this issue is not a bug but instead the desired behaviour then feel free to close it.

🐛 Bug report
Status

Needs work

Version

1.2

Component

Code

Created by

🇦🇺Australia Demma10

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024