Zend Framework 101: Zend_Cache
In this article I will introduce you to the Zend_Cache component of the Zend Framework. This component is used for improving the performance of your web application by saving generated data for later reuse.
Caching is typically used when the cost of generating the data is high, and the data doesn't change often enough to justify generating it from scratch upon every request.
While the idea behind caching is straightforward, there are certain considerations and complexities to be aware of. You need to consider the type of data you want to cache and the situations in which to use it.
In this article we will look at caching the following types of data:
- Arbitrary data structures (such as data returned from a remote web feed or web service)
- The entire output of a HTML page
Additionally, we will look at managing your cached data using tags. Tags allow you to clear relevant records without having to clear your entire cache.
This article requires Zend Framework, downloadable from http://framework.zend.com. At time of writing, the current version of Zend Framework is 1.10.4.