There are a million ways to implement a PHP based content cache so why would we need another one. The only plausible reason I can think of is that most of the PHP caching implementations seem to overcomplicate the matter. In this article, we'll focus, not specifically on PHP caching but, on caching as a general system design principle and how it may be implemented. The code is written in PHP but the concepts can be applied to any server side script no matter what the language. A cache is a very simple thing. In essence, you do something, you save the result and then next time you're requested to do the same thing, you just fetch the result rather than working it out again. It's analogous to remembering that 4 x 4 = 16 rather than working it out every time.
read more...