Skip to content

Instantly share code, notes, and snippets.

@omega8cc
Last active August 17, 2021 02:20
Show Gist options
  • Save omega8cc/5731695 to your computer and use it in GitHub Desktop.
Save omega8cc/5731695 to your computer and use it in GitHub Desktop.
Steps to install and configure Redis for any Drupal site on BOA

Steps to install and configure Redis for any Drupal site on BOA:

  1. Login to the dashboard and create a ticket requesting the Redis Service.
  • No, no, scratch that. I forgot it is BOA ;)
  • OK, done!
  • Wait. What?!
  • Seriously. You don't need to do anything -- it works out of the box!

How it works?

Redis server, PhpRedis extension and Redis integration module are already installed, pre-configured and active by default. In all platforms. Even in your custom platforms.

All required configuration details already exist in the global.inc file, included in every site settings.php file -- both for Drupal 7 and Drupal 6 sites, so Cache Backport module is also included by default.

You can customize default configuration per site in the standard local.settings.php file, if you need to exclude some cache bins from Redis caching. By default only cache_form bin is excluded with:

$conf['cache_class_cache_form'] = 'DrupalDatabaseCache';

You can also enable Redis lock support, which is not enabled by default, but ready both for Drupal 7 and Drupal 6 sites, either per platform by creating empty control file:

sites/all/modules/redis_lock_enable.info

or per site, by creating empty control file:

sites/foo.com/modules/redis_lock_enable.info

To disable Redis integration for debugging, either per site or per platform, simply create an empty control file, so its path will be, for site level: sites/foo.com/modules/redis_cache_disable.info or for platform level: sites/all/modules/redis_cache_disable.info

Oh, and you can even disable Redis on the fly by adding ?noredis=1 to any URL.

That is it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment