What is the alternative of cacheable = “false”

What is the alternative of cacheable = “false”

sometimes you can not use cacheable=”false” in your module because it will disable the cache of the whole page.also, you can not use isprivatescope because magento not allowed. so, you can use a section of magento or create your custom section for your module using section.xml you can use a section

Create section.xml in etc/frontend

xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Customer:etc/sections.xsd">



Copyright © 2024 Tridhya Tech Limited, Inc. All rights reserved.