March 19, 2003
Caching pseudo dynamic pages
Bill McCoy wonders about HTML page caching with this IMPblog: IMAP weblog software.
Apache has the ability to do this. Use mod_rewrite. It's devlishly simple. Present a URL that appears to be static but switch it behind the scenes to a dynamic script if the page doesn't exist. But grab the dynamic results and serve them up static for future requests. To manage the freshness one would then just have your other code delete the file should the data it's based upon change. This way no server action occurs until something actually requests it and subsequent calls are faster since the output's been cached.
Comments







