Caching and when to Cache
Caching, everyone knows about it, everybody talks about it, but what is it? In its purest essence caching is all about serving your application as quickly as possible to the user. That's what we will talk in this recipe when and how to cache.
Getting ready
We will be working with the Zend Framework skeleton application again, so it would be wise to have that set up.
How to do it…
When developing an application, caching might not be something that immediately comes up in the design, and most probably this will come up when the application goes live and after a while you find your application responding slower than when you first put it live.
That is the perfect (well not perfect, as that would be during the design phase, obviously) time to consider implementing a cache.
When we talk about caching, a common misunderstanding is that we are solely talking about caching an HTML output. Nothing could be further from the truth, as we have several powerful methods of caching...