Last updated September 2, 2007. Created on January 9, 2005.
Edited by add1sun, puregin, Steve Dondley. Log in to edit this page.

Busy Drupal sites may want to consider caching their pages to lighten the load on their server and speed up page generation times.

Normally, every time you visit a Drupal page, Drupal makes dozens of queries to the database to pull out the data needed to generate the HTML that your web-browser renders. On a large site with many modules installed or with lots of content on a page, the number of queries per page could rise into the hundreds. Usually, you don't notice all the work Drupal does because computers are very fast and Drupal is very efficient. However, on very busy sites with many hundreds or thousands of page views per minute, the amount of work required to serve each page may start to slowing the server to a crawl.

Busy sites can reduce the work required to generate pages by enabling Drupal's page cache.

With the cache turned on, Drupal stores all the HTML code for any page visited by an anonymous user directly into the database. When another request for the same page comes along, Drupal knows to fetch this page out of the database rather than re-generating it from scratch. The result is that hundreds of queries are replaced with one single query, thereby significantly lightening the load on the web server.

The cache settings are located at Administer > Site Configuration > Performance.

Looking for support? Visit the forums, or join #drupal-support in IRC.