Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[view] [cache] Too restrictive cacheable condition as only HTTP 200 and GET are cacheable #199

Open
alquerci opened this issue Oct 18, 2018 · 0 comments

Comments

@alquerci
Copy link
Contributor

alquerci commented Oct 18, 2018

The view cache work well but suffer of a limitation in order to be compatible with HTTP specifications about cacheable status codes and methods.

Expected

  • On Symfony4 pages with response 200, 203, 300, 301, 302, 404, 410 are cacheable with additional condition on the Cache-Control status.

  • Be able to cache GET and HEAD methods.

Actual

  • Only pages with HTTP 200 response can be stored on cache.
  • Only response from GET method can be stored on cache.

More Details

See https://github.com/symfony/symfony/blob/v4.1.6/src/Symfony/Component/HttpFoundation/Response.php#L506

@alquerci alquerci changed the title [view] [cache] Too restrictive cacheable condition as only HTTP 200 is cacheable [view] [cache] Too restrictive cacheable condition as only HTTP 200 and GET is cacheable Oct 18, 2018
@alquerci alquerci changed the title [view] [cache] Too restrictive cacheable condition as only HTTP 200 and GET is cacheable [view] [cache] Too restrictive cacheable condition as only HTTP 200 and GET are cacheable Oct 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant