Information for: DEVELOPERS   PARTNERS

Using 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. Storing Drupal’s cache tables in Memcached reduces the load on the database with every page load.

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

Installation instructions

For installation instructions, see Enabling Memcached on Cloud Platform.

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 adding the libraries to create the PHP functions for communication with the daemon; memcached is a PHP library which facilitates communication with the daemon. Cloud Platform runs the memcache libraries. The PHP memcache project at Drupal.org uses the memcache libraries.

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

Memcached availability

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

Product name Description
Cloud Platform Professional You can enable and manage Memcached for your applications.
Cloud Platform Enterprise Acquia will configure your servers with an appropriate amount of memory for Memcached. As an option, you can buy a dedicated Memcached server.
Site Factory To use Memcached with your websites, contact your Technical Account Manager (TAM) or Account Manager to review your hardware before implementing a post-settings.php hook.
Cloud Platform Free Memcached is not supported. Learn more about Cloud Platform Free and how to upgrade your subscription.
Cloud Platform CD Cloud Platform CD environments meeting certain requirements can use Memcached.
Cloud Platform pipelines feature Memcached is supported for YAML files using version key 1.3.0 or greater.

Cloud Platform CD prerequisites for using Memcached

Cloud Platform CD subscribers can use Memcached and install it on a per-website basis, and can secure Memcached 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, ensure you use version 7.x-1.6 or greater.

After meeting the preceding requirements, CD applications can use the 64 MB of allocated memcache.