Information for: DEVELOPERS   PARTNERS

Using Memcached

About Memcached

Memcached is a general-purpose memory cache server daemon. It can improve Drupal application performance by moving Drupal’s standard caches out of the database and by caching the results of other expensive database operations.

The most common use of Memcached with Drupal is storing Drupal’s cache tables in Memcached instead of in the application database. This reduces the load on the database with every page load.

Using Memcached may not make any noticeable difference to an application that is already performing well at every layer in the server stack. Memcached is most helpful to applications that need to reduce the load on their database servers.

Installation instructions

For installation instructions, see Enabling Memcached on Acquia Cloud.

To learn more about how Memcached can benefit your website, see information about the architecture of Memcached, and how Drupal and the memcache module work together. To improve Memcached performance on your website, you can tune your Memcached settings for optimal performance, and enable stampede protection by moving locks into memory.

You can also install the PECL memcache extension to provide an API to communicate with the Memcached service.

Memcached versus memcache

Memcached is the name of the server-side daemon; memcache is the name of the PHP extension that adds the libraries that create the PHP functions for communication with the daemon; there is also a PHP library called memcached, which facilitates communication with the daemon. Acquia Cloud runs the memcache libraries. In addition, the PHP memcache project at uses the memcache libraries.

For more information about how to communicate with the Memcached daemon using PHP, see the Memcache reference at

Memcached availability

Acquia Cloud supports Memcached for subscriptions and products based on the following table:

Product name Description
Acquia Cloud Professional You can enable and manage Memcached for your applications.
Acquia Cloud Enterprise Acquia will configure your servers with an appropriate amount of memory for Memcached. As an option, can purchase a dedicated Memcached server.
Acquia Cloud Site Factory To use Memcached with your websites, contact your Technical Account manager (TAM) or Account Manager to evaluate your hardware before implementing a post-settings.php hook.
Acquia Cloud Free Memcached is not supported. Learn more about Acquia Cloud Free and how to upgrade your subscription..
Acquia Cloud CD Acquia Cloud CD environments that meet certain requirements can use Memcached.

Acquia Cloud CD prerequisites for using Memcached

Acquia Cloud CD customers can use Memcached, which is implemented on a per-website basis and is secured using SASL credentials. If you need Memcached support for your CD environment, the environment must meet the following prerequisites:

  • The environment uses the PECL memcached extension.
  • The environment must include the Memcache API and Integration module. If you are using Drupal 7, be sure to use version 7.x-1.6 or greater.

Once these requirements are met, CD applications can use the 64MB of allocated memcache.