When loading a Magento based request or page, in the headers of your request, will be a Pragma: no-cache , as well as settings in Cache-Control: for no-cache and must-revalidate.
In terms of performance, wouldn't it be more suitable allow for these settings to be done by Apache using mod_rewrite?
You could then disable it, via your web server.
This would mean loading a product based page would be loaded from the server each time, even if no new content was given.
As far as I am aware, this is defined by the file:
/app/code/core/Mage/Core/Model/Url/Rewrite/Request.php
Line 292, protected function _sendRedirectHeaders
:
/**
* Add location header and disable browser page caching
*
* @param string $url
* @param bool $isPermanent
*/
protected function _sendRedirectHeaders($url, $isPermanent = false)
{
if ($isPermanent) {
header('HTTP/1.1 301 Moved Permanently');
}
header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
header('Pragma: no-cache');
header('Location: ' . $url);
exit;
}
Are there times when Pragma: No-cache should not be used?