Drupal Redis

Make Drupal Redis super easy with Redis Labs.

Redis Labs’ products and services enable running Redis datasets in a highly available and auto-scalable manner, with predictable top performance.

The Redise Pack lets you install an enterprise grade Redis cluster in your environment of choice, whether an on-premises data-center or your preferred cloud platform. It gives you full control of your data and configuration – no clustering or sharding knowledge required!

Redise Cloud is a fully-managed cloud service for hosting and running Redis dataset without dealing with nodes, clusters, failure recovery or performance stabilization. Our technology does all that in a fully automated manner. Redise Cloud is available on all popular clouds and platforms-as-a-service.

Using Redis with Drupal 7

Installing Redis for Drupal

Follow these steps to install Redis as a cache for Drupal:

  1. Install Predis under sites/all/libraries/predis
  2. Download and install the Drupal Redis module
Configuring Redis for Drupal

To configure Drupal to use Redis as a cache, append the following lines to your settings.php file:

$conf['redis_client_interface'] = 'Predis';
$conf['redis_client_host'] = 'hostname';
$conf['redis_client_port'] = port;
$conf['redis_client_password'] = 'password';
$conf['lock_inc'] = 'sites/all/modules/contrib/redis/redis.lock.inc';
$conf['cache_backends'][] = 'sites/all/modules/contrib/redis/redis.autoload.inc';
$conf['cache_default_class'] = 'Redis_Cache';
  • In line 2, replace hostname with your database’s hostname or IP address
  • In line 3, replace port with your database’s port
  • In line 4, replace password with your database’s password Displaying Redis Howto – merged.md.

For more information on using Redis Labs’ products and services with drupal-7 please see the Howto page.