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

EZP-32020: make /_ez_http_invalidatetoken cached by varnish #137

Merged
merged 1 commit into from
Nov 2, 2020
Merged

EZP-32020: make /_ez_http_invalidatetoken cached by varnish #137

merged 1 commit into from
Nov 2, 2020

Conversation

ITernovtsii
Copy link
Contributor

@ITernovtsii ITernovtsii commented Oct 9, 2020

Question Answer
JIRA issue EZP-32020
Type Bug
Target version 2.1+
BC breaks no
Doc needed no

Currently, each request to purge cache by tags triggers a request to "/_ez_http_invalidatetoken" route
A response of this route should be cached by varnish, but it's not.
It's caused by session usage, and the fact this response does not vary by user context.
So, Symfony listener changing response to private.

PS. the same NO_AUTO_CACHE_CONTROL_HEADER used in fos symfony cache bundle

TODO:

  • Implement feature / fix a bug.
  • Implement tests + specs and passing ($ composer test)
  • Fix new code according to Coding Standards ($ composer fix-cs).
  • Ask for Code Review.

@andrerom andrerom requested a review from vidarl October 12, 2020 08:02
@andrerom

This comment has been minimized.

@ITernovtsii

This comment has been minimized.

@andrerom andrerom requested a review from ViniTou October 13, 2020 12:48
@andrerom andrerom changed the base branch from 2.0 to 2.1 October 13, 2020 13:30
@andrerom

This comment has been minimized.

@vidarl

This comment has been minimized.

@andrerom

This comment has been minimized.

@mnocon mnocon self-assigned this Oct 30, 2020
Copy link
Member

@mnocon mnocon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on eZ Platform 3.1 that the token is cached and next requests to purge cache do not hit the endpoint providing the token.

Approved!

@lserwatka lserwatka merged commit bae8be4 into ezsystems:2.1 Nov 2, 2020
@lserwatka
Copy link
Member

lserwatka commented Nov 2, 2020

@ViniTou could you merge it up? 2.2 and master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

7 participants