Caching to improve performance

The single biggest improvement to application performance is to skip as many computation steps as possible by using caching.

Caching in Drupal can occur at many levels. This guide will help you to understand best practice and how to implement caching appropriately for your application.

Caching Overview

In order to maximize performance of Drupal, we need to understand Drupal's execution and caching model.

Opcode Caching

Enabling an Opcode Cache is an easy and effective way to improve performance of PHP execution.

Reverse Proxy Cache

A well tuned reverse proxy cache, sometimes also referred to as a "web accelerator", can dramatically increase a websites performance. Squid

Squid Caching

Squid is a fully-featured, open-source web-content caching system. In accelerator mode, squid can be used in between your users and your

Varnish Cache

Varnish Cache is a modern reverse proxy cache software package. It has been built from the ground up to be a dedicated reverse proxy cache

Varnish 2.x Configuration

The VCL snipets below are based on a Varnish 2.0.x example configuration from this blogpost by Caleb G

Varnish 3.x Configuration


Varnish 4.x Configuration


Google's mod_pagespeed for Apache 2.2+

In November of 2010 Google released an Apache module named mod_pagespeed. This is a server side module for Apache designed to manage caching

Load Page Cache after cron Runs

Drupal creates pages and serves them to clients. The completed pages are also stored in the cache_page table of the database -- referred to

Guide maintainers