#native_company# #native_desc#

The Need For Speed Page 2

By Piergiorgio Spagnolatti
on March 21, 2001

Want More Speed? Let’s Cache…

If you need extra speed for your heavy PHP application, than probably the solution is caching. There
are some possible solutions out there. I tried Zend Cache (trial-version), APC, and Afterburner Cache.
The above are “caching modules”. They store and intermediate coded version of your PHP sources inside
the webserver’s memory, the first time your .php file has been requested, and they serve subsequent
requests with the “compiled” version. This approach can really boost your application’s performance,
since this minimizes access to disk (the code has been already read and parsed), and also
works in RAM, which makes things a lot faster. Obviously the caching module will notice of changes
in your PHP sources, and will redo the job again, so your users won’t get pages coming out of stale
cached PHP code. Caching modules are really well-suited for heavily loaded sites, since they can
decrease your server’s load and make PHP work even faster. But, which one should I choose?
Zend Cache is a commercial product from Zend Technologies (yes, the ones that brought us the PHP engine
and the Zend Optimizer for free…). It really does what they say! You can notice the speed improvement
in heavy PHP pages just after the first run, and the server also has more free resources. Unfortunately
you have to pay for this, but in some cases it’s well worth the price.
Afterburner Cache is a free caching module available from Bware Technologies.
Currently in beta, it seems to do same the same things that Zend Cache does. It can’t push performance
up as Zend Cache does (yet), and it doesn’t work with Zend Optimizer yet, but it’s free,
and my compliments go to bware folks for this nice job.
APC (Alternative PHP Cache) is another free caching module available from
Community Connect.
Seems stable enough for production use, and also seems to speed up things a lot. Beware, I haven’t found a
official benchmark yet, so I had to test them with some of my applications. As always, your mileage my vary.