Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Memcache API and Integration

Security covered Under active development 44,954 sites

This module integrates Drupal with Memcached, providing a caching and locking backend. It also offers an administrative overview of Memcached interactions and statistics.

Overview

This module provides integration between Drupal and Memcached, a highly efficient, in-memory key-value store. By moving your cache out of the database and into Memcache's RAM, you can dramatically reduce database load, speed up page rendering, and scale your site to handle high traffic.

Server Requirements

Before installing this module, your server or hosting environment must have the following installed and running:

  1. The memcached daemon (the actual memory caching service).
  2. The php-memcached extension (the PHP library that talks to the service).

Note: 8.x-2.x does support the older, deprecated PECL Memcache extension. Support for this library will be removed before 3.x.

๐Ÿš€ Quick Start (Single Server Setup)

If you are running a standard site and your Memcache server is running on localhost:11211 (the default), getting started is incredibly simple. You do not need complex routing.

  1. Enable the Memcache module.
  2. Add the following lines to the bottom of your settings.php file:
       // Define Memcache as the default cache backend.
      $settings['cache']['default'] = 'cache.backend.memcache';
    

That's it! Drupal will now route standard cache requests to Memcache instead of your database.

๐Ÿ› ๏ธ Advanced Features (For Enterprise & High-Traffic Sites)

Memcache is designed to scale. While the basic setup works for most, the module supports deep infrastructure tuning. See the README for detailed instructions on configuring the following and more:

  • Cache Bin Routing: Send large caches (like render or dynamic_page_cache) to dedicated Memcache instances while keeping smaller caches elsewhere.
  • Early Bootstrap Caching: Swap out the early container definition to bypass database queries entirely during Drupal's initial bootstrap phase.
  • Lock API Integration: Move Drupal's locking mechanism into Memcache to prevent database race conditions during cache stampedes.
  • Multi-Server Clustering: Distribute your cache across multiple physical servers.
  • Network Tuning: Advanced TCP configuration (like disabling Nagling) and custom key-hashing for maximum throughput.
Drupal 9โ€“11

Ask your assistant about Memcache API and Integration

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
4
Tracked since
Jul 2024
Latest release
1 week ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
8.x-2.9 Stable 9โ€“11 Sep 30, 2026
8.x-2.8 Stable 9โ€“11 Apr 15, 2026
8.x-2.7 Stable 9โ€“11 Aug 14, 2024
8.x-2.6 Stable 9โ€“11 Jul 11, 2024