Of course, the premise is to open the CDN in a function reload_into_ims on. So the user sends over No-cache also not afraid of. Because this will give No-cache to If-modified-since. So we write the program is mainly to If-modified-since control. Remember, the cache system architecture in the best is the back-end to control, so the best way is the program to manage the expiration. Oh, I can only PHP, write one in PHP, the other program is the same.
See me under the program, hehe, 5 minutes expired.
Copy the Code code as follows:
$headers = Apache_request_headers ();
$client _time = (isset ($headers [' if-modified-since '])? Strtotime ($headers [' if-modified-since ']): 0);
$now =gmmktime ();
$now _list=gmmktime () -60*5;
if ($client _time< $now and $client _time > $now _list) {
Header (' last-modified: '. Gmdate (' d, D M Y h:i:s ', $client _time). ' GMT ', true, 304);
Exit (0);
}else{
Header (' last-modified: '. Gmdate (' d, D M Y h:i:s ', $now). ' GMT ', true, 200);
}
?>
The above describes the acdsee2009 license code PHP page expiration time of the control code, including the acdsee2009 license code content, I hope the PHP tutorial interested in a friend helpful.