コード例 #1
0
 /**
  * Checks if the response can be considered different according to the request
  * headers, and the caching response headers. If it was not modified, then the
  * render process is skipped. And the client will get a blank response with a
  * "304 Not Modified" header.
  *
  * @params Controller $controller
  * @return boolean false if the render process should be aborted
  **/
 public function beforeRender(Controller $controller)
 {
     $shouldCheck = $this->settings['checkHttpCache'];
     if ($shouldCheck && $this->response->checkNotModified($this->request)) {
         return false;
     }
 }
コード例 #2
0
 /**
  * Checks if the response can be considered different according to the request
  * headers, and the caching response headers. If it was not modified, then the
  * render process is skipped. And the client will get a blank response with a
  * "304 Not Modified" header.
  *
  * @param Controller $controller Controller instance.
  *
  * @return bool False if the render process should be aborted.
  */
 public function beforeRender(Controller $controller)
 {
     if ($this->settings['checkHttpCache'] && $this->response->checkNotModified($this->request)) {
         return FALSE;
     }
 }