コード例 #1
0
ファイル: Controller.php プロジェクト: amysupeta/Exame1
 /**
  * Forces the user's browser not to cache the results of the current request.
  *
  * @return void
  * @link http://book.cakephp.org/2.0/en/controllers.html#Controller::disableCache
  * @deprecated 3.0.0 Will be removed in 3.0. Use CakeResponse::disableCache().
  */
 public function disableCache()
 {
     $this->response->disableCache();
 }
コード例 #2
0
 /**
  * Tests the disableCache method
  *
  */
 public function testDisableCache()
 {
     $response = new CakeResponse();
     $expected = array('Expires' => 'Mon, 26 Jul 1997 05:00:00 GMT', 'Last-Modified' => gmdate("D, d M Y H:i:s") . " GMT", 'Cache-Control' => 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
     $response->disableCache();
     $this->assertEquals($expected, $response->header());
 }