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

Refactor cache tag adjustment logic #101

Merged
merged 1 commit into from
Sep 12, 2017
Merged

Refactor cache tag adjustment logic #101

merged 1 commit into from
Sep 12, 2017

Conversation

udovicic
Copy link
Contributor

Unlike the default Magento Varnish setup, Fastly does not use , as a cache tag separator, but rather spaces. This is being adjusted in one of the plugins:

https://github.com/fastly/fastly-magento2/blob/master/Model/Layout/LayoutPlugin.php#L112

However, the code above relays on premise that output will be always rendered via layout, which is not the case for ESI blocks:

https://github.com/magento/magento2/blob/2.2.0-rc2.3/app/code/Magento/PageCache/Controller/Block/Esi.php#L16-L34

As a result, any ESI block that had more than one cache tag was not invalidated properly.

Considering the above, code has been changed to utilize the plugin around the setHeader() to do the changes, which covers every case(if development is done following the Magento practices)

@vvuksan vvuksan merged commit 4f5c89c into fastly:master Sep 12, 2017
@udovicic udovicic deleted the bugfix/esi-not-invalidated branch February 15, 2018 12:09
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

Successfully merging this pull request may close these issues.

2 participants