I am trying to make a whole custom controller not cacheable. In my layout XML I added this:
<?xml version="1.0" ?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceContainer name="content"> <block name="welcome.index" class="VendorWelcomeBlockWelcomeIndex" template="Vendor_Welcome::welcome/index.phtml" cacheable="false" /> </referenceContainer> </body> </page>
In my local, it works fine and the page is not coachable. However, when I upload it to our staging environment in Magento Cloud with Fastly enabled, it doesn’t work and the page is stored in cache showing the info from another customer. Do I need to do something different to make that the cacheable=”false” works with Fastly?