News Feed
Jobs Feed
Sections

Recent Jobs

News Archive
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.

0 comments voice your opinion now!
zendcache zendframework sql query results example code



Similar Posts

International PHP Magazine: Poll: In Which of the following Symfony takes over Zend Framework?

Douglas Brown's Blog: Three Important Tips to Write PHP Code Defensively

Dikini.net: Rewriting macros - the peculiar case of php

International PHP Magazine: Which one of the following is the Best Function for MySQL Data Fetching

Rob Allen's Blog: Simple Zend_Layout Example


Community Events









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


ajax framework example package book application code releases zendframework database job developer zend PEAR cakephp PHP5 release conference security mysql

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