News Feed
Jobs Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Rob Allen's Blog:
Notes on Zend_Cache
July 11, 2008 @ 07:58:43

Rob Allen has posted a few notes about the Zend_Cache component of the Zend Framework to his blog today.

Recently I needed to speed up a legacy project that makes a lot of database calls to generate each page. After profiling, I discovered that 90% of the database calls returned data that rarely changed, so decided to cache these calls. One of the nice things about Zend_Framework is that its use-at-will philosophy means that you can use any given component with minimal dependencies on the rest of the framework code.

He shows how, using the Zend_Cache module (and friends Zend_Loader and Zend_Exception), he creates a caching class that can be called anywhere and is used to cache the results from the queries. His default lifetime is set to 7200 seconds - two hours - before the script needs to refresh the cache and get the latest updates.

1 comment voice your opinion now!
zendcache zendframework sql query results example


blog comments powered by Disqus

Similar Posts

The Bakery: Simple way to memcache (almost) all database queries

Zend Developer Zone: Zend Framework- Coming soon to a Command Line near You!

Zend Developer Zone: Announcing the August 2011 Zend Framework Bug-Hunt

Zend Developer Zone: Zend Webinar Wednesdays: Zend Framework 1.0 - An Overview

Zend Developer Zone: Zend Framework 1.0.1 Releases


Community Events











Don't see your event here?
Let us know!


code unittest example release framework hack composer hhvm overview component symfony2 opinion package security podcast facebook language application introduction install

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework