Remove unnecessary cache clearing

Created on 21 July 2025, 3 months ago

Problem/Motivation

In the module, that are a few cache clears that clear the whole cache, and it looks like it is unnecessary. This can cause performance issues on large sites.

The configuration changes/entity updates should be enough to trigger invalidation of relevant tags.

Steps to reproduce

1. Update Legal configuration (either the config, or the Ts&Cs)
2. Submit the form
3. Cache gets cleared

Proposed resolution

Remove the unnecessary clearing of the whole cache.

Remaining tasks

Ensure all caches are accounted for.

User interface changes

None.

API changes

None.

Data model changes

None.

📌 Task
Status

Active

Version

4.0

Component

Code

Created by

🇬🇧United Kingdom littlepixiez

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

Merge Requests

Comments & Activities

  • Issue created by @littlepixiez
  • Pipeline finished with Success
    3 months ago
    Total: 167s
    #552969
  • Pipeline finished with Success
    3 months ago
    #553068
  • 🇬🇧United Kingdom littlepixiez

    I was looking at what gets flushed in the submits, and we definitely invalidate:

    config:legal.settings
    legal_conditions_list

    However, with the killswitch on the Page cache, I'm unsure as to whether this is enough. I wonder whether some more in-depth caching should be integrated? But I do not believe we need to flush all of the caches. I've added extra contexts/tags to the controller for good measure.

  • 🇭🇺Hungary peter_serfozo

    Patch based on the MR

Production build 0.71.5 2024