Anyone know of any good php page caching tutorials? Some of my pages have queries and operations that take quite a while... caching generated HTML would solve this problem wonderfully but I don't want to migrate to a framework like cake or code igniter. Anyone have good info or know of a good tutorial online for how to build this custom?
Any good page caching tutorials?
My friend google came up with a few; http://www.google.co.uk/search?q=php+page+cache+tutorial&sourceid=navclient-ff&ie=UTF-8&rlz=1B3GGGL_enGB250GB250&aq=t
It's not that hard a process to create a simple cache.
You'll want to make use of the output buffer methods in PHP.
ie. http://uk.php.net/ob_start is a good starting place.
It can be used to catch all the output on a page. You basically then store that in a file, then on the page load - you check to see how old the stored file is and either load that or render the page again and update the cache.
I recently made a caching function, but that's the very basics of it right there.