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

Do not use cache="false" in any block in layout default.xml #64

Open
cieslix opened this issue Aug 27, 2024 · 1 comment
Open

Do not use cache="false" in any block in layout default.xml #64

cieslix opened this issue Aug 27, 2024 · 1 comment

Comments

@cieslix
Copy link

cieslix commented Aug 27, 2024

https://github.com/GetResponse/magento/blob/master/view/frontend/layout/default.xml#L28

<block name="getresponse.order.placed" class="GetResponse\GetResponseIntegration\Block\Checkout\OrderPlaced" 
template="GetResponse_GetResponseIntegration::checkout/order_placed.phtml" cacheable="false" />

Do not use such configuration in layout/default.xml this is killing Magento2 performance - all pages are not cacheable in full page cache because this one small block.
Move it to specific layout xml like layout/checkout_onepage_success.xml.

@pczerkas
Copy link

pczerkas commented Aug 30, 2024

@cieslix
Maybe this holds for some old versions of Magento, but this is not true for example for 2.4.6-x

Set a break here and see yourself:
image

They are referencing a container, which exists only during checkout:

<referenceContainer name="order.success.additional.info">
    <block name="getresponse.order.placed" class="GetResponse\GetResponseIntegration\Block\Checkout\OrderPlaced" template="GetResponse_GetResponseIntegration::checkout/order_placed.phtml" cacheable="false" />
</referenceContainer>

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

No branches or pull requests

2 participants