Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...

When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Zend Framework 101: Zend_Cache


At this stage you should have a reasonable understanding of how Zend_Cache works. It is simple but can be very powerful.

One of the most important things I can recommend is to clearly document all of your caching points. That is, know exactly where your cache is being read from, being written to, or being cleared. Know exactly how tags are structured and what impact clearing on them will have.

It's very easy to let a complex caching system get out of control and to have no idea exactly how it is operating. I recommend including logging on hits and misses and tracking the frequency of cache modifications.

To summarise, in this article we looked at how to implement a caching solution in your PHP web site using the Zend_Cache component of the Zend Framework.

I first introduced you to how caching works and how it can be leveraged to improve your web site's performance. Next I introduced you to Zend_Cache and its front and back-ends drivers.

Next I showed you how to cache the output of entire PHP scripts using the page front-end. I then showed you how to tag cache records, then clean the cache using tags. Finally, I described a real-world implementation of Zend_Cache and its tagging mechanism.

Further Reading

Other Options

In This Article