public function check_request(YZE_HttpCache $cache) { if (!$cache) { return; } if ($cache->last_modified() && @$this->get_from_server('HTTP_IF_MODIFIED_SINCE')) { if (strtotime($cache->last_modified()) == strtotime($this->get_from_server('HTTP_IF_MODIFIED_SINCE'))) { throw new YZE_Not_Modified_Exception(); } } if ($cache->etag() && @$this->get_from_server('HTTP_IF_NONE_MATCH')) { if (strcasecmp($cache->etag(), $this->get_from_server('HTTP_IF_NONE_MATCH')) == 0) { throw new YZE_Not_Modified_Exception(); } } }