-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Add MAGE_RUN_TYPE+MAGE_RUN_CODE to FPC identifier #18624
Add MAGE_RUN_TYPE+MAGE_RUN_CODE to FPC identifier #18624
Conversation
Hi @amenk. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
Hi @amenk, can you please check the failing tests? |
Okay I will..probably I should also add a new test as well. I was afraid using mage store constants in framework but it seems to happen also in other places. |
I think the approach is correct, will double check internally and get back to you if anything changes. |
Anything on this one @amenk? It's been a while, please let me know if you are still working on this PR. |
@miguelbalparda I was waiting for your response on this ... and I am having a lack of time, but will try my best to get that PR through, if you tell me, the approach is correct. |
Closing for lack of feedback, feel free to reopen if you have time to keep working on this, |
Did you already double check? |
@miguelbalparda your feedback would motivate me :-) I am still not sure if my approach has scoping issues ... |
Will work on this today. |
7911630
to
c21c44e
Compare
Needs to be called from LinkProcessor
@amenk thanks for your patience, this pull request is under discussion |
@magento run all tests |
Currently Magento 2.2.6 full page cache does not work correctly, when using SetEnv or similar techniques on unchanged URLs So the MAGE_RUN_TYPE and MAGE_RUN_CODE should be added to the FPC identifier to allow for such use cases. A common case is Magento 2 behind a reverse NGINX proxy. This commit adds the MAGE_RUN_TYPE and MAGE_RUN_CODE to the cache idenfier, if present. It is done inline with the design exceptions. Also the existing cache idenfier is change a little to accomondate the new information properly. Of course this will invalidate existing page caches with design exceptions, but as for any deploy the page cache usually is invalidated, this is not a problem.
@amenk unfortunately, only members of the maintainers team are allowed to unassign developers from the pull request |
I did not try to unassign anybody :) |
all checks are green now |
Hi @sivaschenko, thank you for the review.
|
✔️ QA passed |
Hi @amenk, thank you for your contribution! |
Description
Currently Magento 2.2.6 full page cache does not work correctly, when using SetEnv or similar techniques on unchanged URLs
So the MAGE_RUN_TYPE and MAGE_RUN_CODE should be added to the FPC identifier to allow for such use cases.
A common case is Magento 2 behind a reverse NGINX proxy.
Manual testing scenarios
Steps to reproduce, without proxy setup:
SetEnv MAGE_RUN_TYPE store SetEnv MAGE_RUN_CODE italy
Now open Frontend
Now set
SetEnv MAGE_RUN_TYPE store SetEnv MAGE_RUN_CODE english
-> Italian version is displayed
Contribution checklist