Enable/disable Redis with one setting

Created on 29 November 2023, over 1 year ago
Updated 30 November 2023, over 1 year ago

Problem/Motivation

On production site I use Redis, but on development with DDEV not.

Steps to reproduce

Now I have to comment all the Redis settings in settings.php

//$settings['container_yamls'][] =  DRUPAL_ROOT . 'sites/default/redis.services.yml';
//$settings['redis.connection']['host'] = '~/.system/redis.sock';
//$settings['redis.connection']['interface'] = 'Predis';
//$settings['redis.connection']['host'] = 
//$settings['redis.connection']['port'] = ;
//$settings['redis.connection']['password'] = 
//$settings['cache']['default'] = 'cache.backend.redis';
//$conf['cache_backends'][]   = 'sites/all/modules/redis/redis.autoload.inc';

Proposed resolution

Have a setting like $settings['redis.connection'] = 'TRUE/FALSE';
And have the other settings only be triggered when the $settings['redis.connection'] is TRUE

Thanks for considering this, greetings,

💬 Support request
Status

Fixed

Version

1.0

Component

Code

Created by

🇳🇱Netherlands Summit

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024