PHPackages                             momentohq/drupal-cache - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. momentohq/drupal-cache

ActiveDrupal-module[Caching](/categories/caching)

momentohq/drupal-cache
======================

v0.5.5(2y ago)0266[1 PRs](https://github.com/momentohq/drupal-cache/pulls)Apache-2.0PHP

Since Sep 27Pushed 1y agoCompare

[ Source](https://github.com/momentohq/drupal-cache)[ Packagist](https://packagist.org/packages/momentohq/drupal-cache)[ RSS](/packages/momentohq-drupal-cache/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (1)Versions (37)Used By (0)

Momento Cache Backend For Drupal
================================

[](#momento-cache-backend-for-drupal)

Prerequisites
-------------

[](#prerequisites)

A Momento API Token is required. You can generate one using the [Momento Console](https://console.gomomento.com/).

The Momento Cache module uses [Momento's PHP SDK](https://docs.momentohq.com/sdks#php-sdk) internally. While installing the Drupal module will automatically install the SDK for you. Separately, you will need to install and enable the following extensions:

1. [The PHP gRPC extension](https://github.com/grpc/grpc/blob/master/src/php/README.md) for the SDK to function.
2. [The C Protobuf extension](https://developers.google.com/google-ads/api/docs/client-libs/php/protobuf#c_implementation) for PHP.

A Momento cache is required to handle Drupal's caching requests. You can create a cache in the [Momento Console](https://console.gomomento.com/).

### Drupal and Momento Rate Limiting

[](#drupal-and-momento-rate-limiting)

Momento's free tier limits accounts' transactions per second (TPS) and throughput (KiBps), and requests that exceed those limits are throttled. While the default limits are fine for exploring and developing with the Momento integration, Drupal's usage of the cache backend can be significantly higher than the default throttling limits under load. Prior to using the integration in a high-traffic or production environment, please reach out to `support@momentohq.com` to raise your account limits. You can check the Drupal dblog and/or the logfile you configure in the settings (instructions below) for rate limiting error messages.

Installation and Configuration
------------------------------

[](#installation-and-configuration)

Add the module with `composer require 'momentohq/drupal-cache:0.5.2'`.

Enable the `momento_cache` module in your Drupal administrator interface or using `drush en momento_cache`.

Add the following to your `settings.php` file:

```
$settings['cache']['default'] = 'cache.backend.momento_cache';
$settings['momento_cache']['api_token'] = '';
$settings['momento_cache']['cache_name'] = '';
$settings['momento_cache']['logfile'] = '';
```

Replace `` with the token you generated in the console. You may also use an environment variable named `MOMENTO_API_TOKEN` to pass your API token to the Momento cache backend. If both are supplied, the settings file takes precedence.

Replace `` with the name of your existing Momento cache. You may also use an environment variable named `MOMENTO_CACHE_NAME`to pass this value. If both are supplied, the settings file takes precedence. **You must create the cache before using the module.**If the cache doesn't exist, errors are written to the Drupal dblog as well as the logfile configured in your settings, if you have specified one.

Replace `` with the path of a file writable by your Drupal server or with `null` if you want to suppress logging. This logfile is used for logging and timing requests as they are handled by the module. Please be aware that this file will grow quickly over time, so if you choose to enable it long-term, you should probably use `logrotate` or some similar utility to keep it from growing out of control.

The example above uses Momento for all Drupal caches. If you prefer to use Momento for specific cache bins, you may assign them individually as well: `$settings['cache']['bins']['render'] = 'cache.backend.momento_cache'`

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 81.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~8 days

Recently: every ~33 days

Total

22

Last Release

780d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/481f82d9851a8348e7e2f289443d2a73f245a9596ad01aa8898fd015d2db9a0b?d=identicon)[momento](/maintainers/momento)

---

Top Contributors

[![pgautier404](https://avatars.githubusercontent.com/u/5394199?v=4)](https://github.com/pgautier404 "pgautier404 (59 commits)")[![momento-github-actions-machine-user](https://avatars.githubusercontent.com/u/87725926?v=4)](https://github.com/momento-github-actions-machine-user "momento-github-actions-machine-user (8 commits)")[![rishtigupta](https://avatars.githubusercontent.com/u/127137312?v=4)](https://github.com/rishtigupta "rishtigupta (4 commits)")[![anitarua](https://avatars.githubusercontent.com/u/138700973?v=4)](https://github.com/anitarua "anitarua (1 commits)")

### Embed Badge

![Health badge](/badges/momentohq-drupal-cache/health.svg)

```
[![Health](https://phpackages.com/badges/momentohq-drupal-cache/health.svg)](https://phpackages.com/packages/momentohq-drupal-cache)
```

###  Alternatives

[predis/predis

A flexible and feature-complete Redis/Valkey client for PHP.

7.8k305.7M2.4k](/packages/predis-predis)[snc/redis-bundle

A Redis bundle for Symfony

1.0k39.4M67](/packages/snc-redis-bundle)[react/cache

Async, Promise-based cache interface for ReactPHP

444112.4M40](/packages/react-cache)[wp-media/wp-rocket

Performance optimization plugin for WordPress

7431.3M3](/packages/wp-media-wp-rocket)[illuminate/cache

The Illuminate Cache package.

12835.6M1.4k](/packages/illuminate-cache)[colinmollenhour/php-redis-session-abstract

A Redis-based session handler with optimistic locking

6325.6M14](/packages/colinmollenhour-php-redis-session-abstract)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
