My mistakes

Archive for February 2008

Upto cakephp 1.1.19.x there is no builtin function for this so,One solution is

Send the below headers before render a view

header(“pragma: no-cache”);
header(“Cache-Control: no-cache, must-revalidate”);
header(“Expires: Mon, 26 Jul 1997 05:00:00 GMT”); // Date in the past

you can place the above code in the function beforeRender or layout file.

Cakephp 1.2.x contains a function Controller::disableCache() this will avoid the browser page caching by sending the corresponding headers.

Advertisements