Make entity forms cacheable

Created on 20 October 2023, about 1 year ago
Updated 4 September 2024, 4 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 1 day 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.71.5 2024