one-liner.php

Example of HttpCaching::sendHeadersSpecifyingFreshness

00001 <?php
00002 require('HttpCaching.php');
00003 HttpCaching::sendHeadersSpecifyingFreshness("1 hour");
00004 /*
00005  * This sends the following headers:
00006  * Expires: Sat, 26 Aug 2006 12:00:07 GMT
00007  * Cache-Control: must-revalidate, max-age=3600
00008  * Last-Modified: Sat, 26 Aug 2006 11:00:07 GMT
00009  * at:
00010  * Date: Sat, 26 Aug 2006 11:00:07 GMT
00011  */
00012 ?>

PHP HTTP Caching
Hugo Haas