mirror of https://github.com/BOINC/boinc.git
web: get rid of If-Modified-Since stuff in cache.inc.
We can't use this since cache functions are called in the middle of page generation
This commit is contained in:
parent
6216673eca
commit
ffda962698
|
@ -126,22 +126,6 @@ function cache_need_to_regenerate($path, $max_age){
|
||||||
clearstatcache();
|
clearstatcache();
|
||||||
$lastmodified = @filemtime($path);
|
$lastmodified = @filemtime($path);
|
||||||
if ($lastmodified) {
|
if ($lastmodified) {
|
||||||
|
|
||||||
// Check to see if this is a conditional fetch.
|
|
||||||
//
|
|
||||||
$if_modified_since = isset($request['If-Modified-Since']) ?
|
|
||||||
(explode(';',$request['If-Modified-Since'])) : false;
|
|
||||||
|
|
||||||
if ($if_modified_since) {
|
|
||||||
$if_modified_since=strtotime($if_modified_since[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($if_modified_since && ($if_modified_since == $lastmodified)) {
|
|
||||||
Header("Last-Modified: " . gmdate("D, d M Y H:i:s",$lastmodified) . " GMT");
|
|
||||||
Header('HTTP/1.0 304 Not Modified');
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
// See if cached copy is too old.
|
// See if cached copy is too old.
|
||||||
// If so regenerate,
|
// If so regenerate,
|
||||||
// and touch the cached copy so other processes
|
// and touch the cached copy so other processes
|
||||||
|
|
Loading…
Reference in New Issue