1

I've created a condition in my admin panel to enable or disable a feature in my module. In my XML I used the ifconfig to check if it's enabled or disabled. I want to disable the cache in the entire page if my module is enabled.

will ifconfig skip the cache parameter if disabled?

<block ifconfig="mycompany_mymodule/general/enable" cacheable="false" class="Magento\Framework\View\Element\Template" name="mymodule" as="mymodule" template="Mycompany_Mymodule::redirect.phtml" before="-">
    <arguments>
        <argument name="view_model" xsi:type="object">Mycompany\Mymodule\ViewModel\Helper</argument>
    </arguments>
</block>

Thank you!

| improve this question | | | | |
  • If so this could be really useful. I'm wondering if you could give it a try and check request headers before and after to see if it makes a difference. – Dominic Xigen May 1 at 22:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.