Cache sometimes still gets not invalidated correctly

Created on 4 November 2024, 5 months ago

Problem/Motivation

Since slot's can use conditions which requires their own caching machanisms to be respected, it sometimes can happen that invalidating for the slot cache tag will not be enough. A simple example would be a request path condition.

Steps to reproduce

- Add a slot to a default layout
- Create a block and configure the slot to use the new slot
- Add a second condition "request path" and limit the content to be shown on just one path of the route you added the slot to
- Now first load a path where the content should not be displayed
- Now load the configured path

The result will be empty since the slot has been cached empty and the path.url cache context from the request path condition will have no effect.

Proposed resolution

Collect all cache metadata from all conditions when building the slot block.

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇩🇪Germany Hydra

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024