Over at phpbuilder.com, a href=”http://www.twitter.com/wjgilmore”>Jason Gilmore (a really smart guy) has posted a great article on how he used Zend_Cache to…well cache stuff. It’s an interesting read, partly because Zend_Cache is cool and partly because Jason is a good writer.
First, I need to say that Zend_Cache is probably my favorite piece of Zend Framework. It’s simple to use, can be used independent of the entire framework and if used correctly, can have a dramatic impact on the throughput of your application.
Jason details how he used Zend_Cache in conjunction with Data he pulled and stored from Amazon.
…because the product data will not change during that 24-hour period, it doesn’t make sense to repeatedly execute the fairly complex JOIN queries and looping statements required to retrieve and format the data. Instead, I used the Zend_Cache component to cache this data, expiring the cache just ahead of the daily update. In this article I’ll show you how to use Zend_Cache to cache your own data, considerably boosting your website performance in the process.
Jason does a good job of showing you how he used Zend_Cache to store the results of the expensive SQL queries. While Jason limits the discussion of Zend_Cache to just his needs and doesn’t talk much about the other options available, it’s still a great read. Really, the only downside is that phpbuilder has so many pop-ups on the page that it’s like a mine-filed running your mouse over the page.
This is a good article for those looking to implement Zend_Cache and want some practical advice.