Zend Framework… Performance & Caching (part 2.1)

July 30, 2007 § 2 Comments

In my previous post (here), I promised you about performance of Zend Framework.

Unfortunately, I cannot give you the result yet. Because it is still work in progress.

So here is the low-down:

First of all, I’m researching (learning) about Zend_Cache, which consist front_end and back_end. Don’t worry about the mumbo jumbo just yet. The front_end is nothing more than helper functions that can help you optimized specific parts of your application code. The back_end utilize different types of medium Zend Framework use (as of version 1.0, there are 5 different choices of storage: filesystem, APC, SQLite, memcache, or ZendPlatform). ZendPlatform is not free.

The plan is to implement caching and run stress/load testing on both before and after-cache. Then I can publish the result here.

Currently, the front_end confuses me on how to utilize it… It promotes sloppy code. Or is it me not finding the good tutorial online?

Here is an example from Zend_Cache_Frontend_Output (<– it’s 1 of 4 front_end Cache objects):

(assuming $cache object has been initialized using the factory pattern)



[you block of PHP code]



How in the world does this promote elegance? I supposed it should be fine if I enforce its usage strictly on View pages. But still…

Another thought would be to cache all public functions inside model classes using Zend_Cache_Frontend_Function. It’s the cleanest, most seperated (because hidden inside model classes), & has the highest impact (because of caching database calls made by the functions).

(Brain starts steaming up…)

So now y’all know why I’m so late in giving the performance report. Stay tuned for more tips on how make your Zend application… “enterprise-level”


§ 2 Responses to Zend Framework… Performance & Caching (part 2.1)

  • d0rr says:

    Hi didip, I’m currently working on Zend Framework (particularly for rewrapping our site to become “enterprise-level”) and am suffering from the performance issue. It does pretty well during stage testing, but it died after a while when it went to production.

    I was using frontend caches heavily in my site, but I dont really know what’s really going on in there (I’m not even an intermediate programmer, anyway).

    So, I’d like to see how we can boost the performance by using caches, specifically, in more efficient ways.


  • didip says:


    1. What is your configuration for frontend and backend?

    2. What do you mean by die? Loads of traffic and the site went down?

    3. When it die, did you have some sort of apache logs or mysql logs? What was the cause? too much database queries? Denial of Service attack?

    Caching doesn’t solve all problems regarding heavy load. You need to know which part of the site that needs cache.

    Sorry that I couldn’t help much.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

What’s this?

You are currently reading Zend Framework… Performance & Caching (part 2.1) at RAPD.


%d bloggers like this: