Posted on

Magento 2.4.1 controller cache control

It seems that on my Magento 2 instance the controller methods are somehow cached because I am doing changes, compiling the code, but they are not visible when they are called. I even added a die() within the main controller method, but I am getting the same result: the controller is not interrupted, running as expected.

This is the cache-control value: cache-control: no-cache, no-store, must-revalidate, max-age=0.
The server is LiteSpeed, but I changed the caching source from LiteSpeed Web Server to Built-in.

What would be the cause and how can I prevent this?
The development process gets very slow and I can’t just rename the controller each time to not serve it from cache again.

Looking forward to hearing back from you.

Leave a Reply

Your email address will not be published.