Addtoany create a large amount of cacariations due to url cache contexthe v

Created on 4 June 2025, about 1 month ago

Problem/Motivation

Url cache context was added to fix issue for anonymous users, however that results in a large number of cache context variations because the url cache context includes any query parameter. The AddtoAny block has the largest number of cache variations on our site > 122,000. This can result in slowdowns to the site when bots start probing for weaknesses with random url query strings on pages that have AddtoAny.

Steps to reproduce

N/A

Proposed resolution

AFAICT the only thing that varies per page is the link url and title. Is it possible to use a less broad cache context e.g. url.path? Or will that break things? Maybe there is a smarter solution?

Remaining tasks

N/A

User interface changes

N/A

API changes

N/A

Data model changes

Feature request
Status

Active

Version

2.0

Component

Code

Created by

achap 🇦🇺

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

Comments & Activities

Production build 0.71.5 2024