Use more granular cache contexts for localAction and LocalTask plugins

Created on 15 June 2022, almost 3 years ago
Updated 7 November 2024, 5 months ago

Problem/Motivation

Currently `url` cache context is given for LocalAction and LocalTask blocks.
When we give the cache busting query parameter like `?v=1` it invalidates the daynamic cache.
Reason is, `url` cache context considers whole url.

I think we should use `ur.path` cache context for the same.

Steps to reproduce

Visit any node pages where local tasks are enabled and schedule_transition is configured.
When you give URL like https://example.com/node/1?v=1, x-drupal-dynamic-cache should be HIT.
It is returned as `MISS` because of generic cache context `url`

Proposed resolution

Use more granular cache context.

Remaining tasks

Fix it and add test cases.

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Version

2.7

Component

Code

Created by

🇮🇳India mohit_aghera Rajkot

Live updates comments and jobs are added and updated live.
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