mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
Refactored Controller::disableCache() to use the CakeResponse object, method was also deprecated
This commit is contained in:
parent
60f504a470
commit
f9c97383e9
1 changed files with 2 additions and 5 deletions
|
@ -864,13 +864,10 @@ class Controller extends Object {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
* @link http://book.cakephp.org/view/988/disableCache
|
* @link http://book.cakephp.org/view/988/disableCache
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
public function disableCache() {
|
public function disableCache() {
|
||||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
$this->response->disableCache();
|
||||||
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
|
|
||||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
|
||||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
|
||||||
header("Pragma: no-cache");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue