How to invalidate Full Page Catch type in Magento 2?

You can invalidate the full_page catch in Magento 2 using invalidate() method from the TypeListInterface.

In some cases you need to invalidate the catch after some event or trigger on the code, you need to do it via passing cache type code as a string or pass multiple catch type list using an array.

Let’s we have to invalidate the full_page cache programmatically, First see the base definition of the method,

Now Code to Invalidate full-page catch in Model class,

Using the given code snippet, you can invalidate the cache type in Magento 2.

You can invalidate multiple catch types at one request by passing an array as a catch type list.

This is the code snippet to do catch invalidate the process.