vijay b
vijay b

Reputation: 469

how to disable full page cache in magento 2 for any particular controller

i am developing one front end module in magento.I need to disable or escape the full page cache for my particular controller.How to achieve it programetically in magento 2

Upvotes: 0

Views: 3521

Answers (1)

Sunny Rathod
Sunny Rathod

Reputation: 508

You have to make block for your page and then you need to make cache disable for that.

Blocks can be set as non-cacheable by setting the cacheable attribute false in layout XML files. For example

<block class="Block\Class" name="blockname" cacheable="false" />

Pages containing such blocks are not cached.

Upvotes: 1

Related Questions