News Feed

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

ThinkPHP Blog:
Methods to Reduce the Load of Your Webserver by Caching Content
June 28, 2006 @ 05:59:28

Every web developer I know wants to find ways to speed up their application. In fact, some go so far as to worry if double-quotes are slower that single quotes overall - more often than not, it just doesn't matter. Instead, they should be looking to other things, things like the applications are are running things behind the scenes. Jo Brunner knows this, which is why this new post has been made on the ThinkPHP blog today - a look at caching content to help de-stress your server.

The method I would like to describe is based on the webserver lighttpd. Lighttpd is a single process webserver written for high traffic sites. It supports fast-cgi out of the box which makes it ideal for hosting PHP applications.

n the scripting world, a common way to optimize the response time of an application is often as follows: the application by itself saves every page result (or fragments) into a cache file before delivering. The next time a routine has to check whether it could output cached content or not. The cache has to be rebuild periodicaly or when the application updates some data entries - it deletes cache files - and generates them again.

But there is a bottleneck: every time the webserver gets a request it has to start the application - even there are no changes made on the data in the background. t would be nice if cached files could delivered as static content. But the question is: how can a webserver decide if a cache file is outdated without involving the application!

So Jo proposes an alternate solution - using a combination of lighttpd, MySQL, and PHP as fast-cgi to lighten the load. Code/configuration examples are included, and all of the complimentary modules needed are linked to as well. There's even a sample PHP application to help illustrate the point.

0 comments voice your opinion now!
caching content lighttpd mysql fast-cgi modules tutorial configuration caching content lighttpd mysql fast-cgi modules tutorial configuration

blog comments powered by Disqus

Similar Posts

SitePoint PHP Blog: How to Create a Laravel CSS-Minify Command

Maggie Nelson's Blog: NTILE() - easy way to generate tag clouds

Community News: Vote on the Best Open Source CMS

Wes Ray's Blog: Configuring Fedora 12 PHP/MySQL Server with Nginx and reverse proxy to Apache

Anthony Ferrara: Iterators - Programming With Anthony

Community Events

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

symfony2 community series php7 interview voicesoftheelephpant framework application podcast conference laravel example introduction performance version library release opinion api composer

All content copyright, 2015 :: - Powered by the Solar PHP Framework