Make entity forms cacheable

Created on 20 October 2023, 8 months ago

Problem/Motivation

Authenticated forms used to be uncacheable because of CSRF tokens. This is not a problem anymore (see 📌 Form tokens are now rendered lazily, allow forms to opt in to be cacheable Needs review ). So that entity forms could probably be cacheable.

As we are not sure the current cacheability metadata of the forms are correct (it was not used so it's not tested), we forced it to be uncacheable in 📌 Form tokens are now rendered lazily, allow forms to opt in to be cacheable Needs review .

We should make sure cacheability metadata are correct, then opt in for cacheability thanks to 📌 Form tokens are now rendered lazily, allow forms to opt in to be cacheable Needs review or 📌 Deprecate not giving cacheability metadata to forms Needs work (when these are done).

Proposed resolution

See remaining tasks beyond.

Remaining tasks

- Update the entity form tests so that they want cacheable entity forms.

- Remove the forced max-age zero temporarily set to entity forms in waiting for this issue to be done.

- Check that the current cacheability metadata of entity forms is correct.

- Maybe add more tests to check correct cacheability.

User interface changes

None, unless better performance is an UI change. :)

API changes

None.

Data model changes

None.

Release notes snippet

To be done.

📌 Task
Status

Active

Version

11.0 🔥

Component
Form  →

Last updated less than a minute ago

Created by

🇫🇷France GaëlG Lille, France

Live updates comments and jobs are added and updated live.
  • Performance

    It affects performance. It is often combined with the Needs profiling tag.

Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024