Mercurial > SimpleWebPresenter
comparison cache_check.inc @ 16:a64e8f968e7e
Fast abort if cachehit.
| author | Tom Fredrik "BFG" Klaussen <bfg@blenning.no> |
|---|---|
| date | Wed, 19 Sep 2012 14:31:02 +0200 |
| parents | f51be7b9711a |
| children | 75ab765300d1 |
comparison
equal
deleted
inserted
replaced
| 15:f51be7b9711a | 16:a64e8f968e7e |
|---|---|
| 13 header("HTTP/1.0 304 Not Modified"); | 13 header("HTTP/1.0 304 Not Modified"); |
| 14 exit; | 14 exit; |
| 15 } | 15 } |
| 16 header("Last-Modified: $gmdate_mod"); | 16 header("Last-Modified: $gmdate_mod"); |
| 17 } | 17 } |
| 18 | |
| 19 function cache_time($path) { | |
| 20 $mtime = filemtime($path); | |
| 21 if ($mtime > $newest) { | |
| 22 $newest = $mtime; | |
| 23 } | |
| 24 } | |
| 18 ?> | 25 ?> |
