Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

OntoSys:
PHP Cache Control
May 24, 2005 @ 11:13:43

In this quick note from PHP Magazine today, there's a pointer to page about PHP cache control and how easily you can implement it on your own site.

The page is bascially just the code - not much in the way of explaination...then again, there's not much needed. They show you a very simple way to create a "cache_check.inc" to see if a file has been previously cached as well as a sample cacheable page to help you get started.

Their methodology is to check the file date versus the value in $_SERVER['HTTP_IF_MODIFIED_SINCE'] (though, apparently this was written some time back, as they don't use the superglobals) to see if it needs to send the new page or not. It's not a complete system by any means, but it does give a simple starting place...

tagged:

Link:


Trending Topics: