How to Serve Cache Only via PHP

On servers using apache, the cache is served via htaccess thanks to the rewrite rule. You can turn this feature off and have the cache serve only via php.

You need to add the following lines after <?php which exists at the top of wp-config.php file.