Dynamic web pages are great; you can adapt the resulting page to your user, show other user’s activity, offer different products to your customers based on their navigation history, and so on. But the more dynamic a website is, the more database queries you’ll probably need to perform. Unfortunately, these database queries consume the largest portion of your running time.
In this tutorial, I will demonstrate a way to improve performance, without running extra unnecessary queries. We’ll develop a query caching system for our data layer with small programming and deployment cost.
(Continue)

Follow Nettuts+ and Tuts+ on Twitter