mageos-magento2 icon indicating copy to clipboard operation
mageos-magento2 copied to clipboard

VCL_recv rework based on closed Magento 2 PR

Open toonvd opened this issue 1 year ago • 2 comments

Description

This PR is a rework of the Magento VCL (the vcl_recv part) PR found here: https://github.com/magento/magento2/pull/36796/files

I left out 2 controversial changes:

  • Removing the pass of /customer and /checkout Main reason for this is that, as a hoster (and support on Varnish issues), I see a lot of extensions that accidently remove cache disables. Without this part of the VCL, the result could be a disaster for merchants.
  • Removing caching of authenticated GraphQL requests Though I understand the reasoning behind this (preventing cache variations), the same technique is used in the frontend. I have seen this work perfectly for one of our clients, so I am hesitant to remove something that seemed to be working

PRs for other subroutines will follow (probably weekly)

All credits go to @peterjaap and @ThijsFeryn, I am simpling slicing this up and removing controversial parts to get early approval.

Related Pull Requests

https://github.com/magento/magento2/pull/36796/files

Manual testing scenarios

  • Load the new VCL
  • Test if compression still works
  • Test if restarts don't loop anymore
  • Test purges without headers

Contribution checklist (*)

  • [x] Pull request has a meaningful description of its purpose
  • [x] All commits are accompanied by meaningful commit messages
  • [x] All new or changed code is covered with unit/integration tests (if applicable)
  • [x] README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • [x] All automated tests passed successfully (all builds are green)

toonvd avatar Dec 02 '23 19:12 toonvd