Allow to opt-in for render caching on POST requests

Created on 21 January 2016, over 8 years ago
Updated 29 January 2024, 5 months ago

Problem/Motivation

There are cases where enabling render caching on POST requests is perfectly safe, even required. For example, token.module would like to use render caching on the token tree but that's almost always opened on POST requests because it's opened in an ajax dialog most of the time.

I'm aware that we'd like to enable it always, but I honestly don't know if we can pull that off for 8.x and there's no progress on that topic at the moment. See 📌 Allow both AJAX and non-AJAX forms to POST to dedicated URLs Postponed

This suggestion is trivial to implement however.

Proposed resolution

Add a post => TRUE flag to #cache, if set, skip the safe methods checks.

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Postponed

Version

11.0 🔥

Component
Render  →

Last updated about 23 hours ago

Created by

🇨🇭Switzerland Berdir Switzerland

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

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.69.0 2024