-
Notifications
You must be signed in to change notification settings - Fork 23
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
[3.x][VCL] Update purge logic from FOS #118
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a proper update to our logic based on what is in FOS, just mind I am no varnish expert, I just compared logic in both sources.
@@ -127,32 +127,33 @@ sub ez_purge { | |||
// Retrieve purge token, needs to be here due to restart, match for PURGE method done within | |||
call ez_invalidate_token; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a regression from this PR, however the code in this subroutine will need to be adapted to also take into account req.method == "PURGEKEYS"
.
Ref: if (req.restarts == 0 && req.method == "PURGE" && req.http.x-invalidate-token) {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proposal for fix on that in e377e19
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me :)
@andrerom What is the recommended way of switching between |
@micszo It's a FOSHttpCache config option, soft is used by default: https://foshttpcachebundle.readthedocs.io/en/latest/reference/configuration/proxy-client.html#tag-mode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verified with sanities on eZ Platform EE master with Varnish 6.1 with softpurge
and purge
.
In fact resolves issues encountered earlier on v3 (#107 (comment)).
Nota bene, @mnocon aptly noticed that there also is https://github.com/ezsystems/ezplatform/blob/master/.platform/varnish.vcl. Will that one have to be adapted to these changes as well? |
not planned on my side, I'd suggest we find a way to drop it and use the one from here. Same with this btw: |
@micszo Changes for meta repo (update platform.sh VCL + remove the other one which was deprecated): ezsystems/ezplatform#505 |
master
Updates VCL to be in sync with the purge logic from FOS.
This drops eZ specific Ban which was Varnish specific, and adds support for FOS capability to do hard tag purge.