Skip to content

Instantly share code, notes, and snippets.

@syammohanmp
Last active October 12, 2023 08:12
Show Gist options
  • Save syammohanmp/1273de01cf0e30233f1b6e23796528e0 to your computer and use it in GitHub Desktop.
Save syammohanmp/1273de01cf0e30233f1b6e23796528e0 to your computer and use it in GitHub Desktop.
Drupal Redis setup using Lando

Drupal Redis setup using Lando

Run below composer commands.

  • lando composer require predis/predis
  • lando composer require drupal/redis

Modify .lando.yml and add redis service.

services:
  redis:
    type: redis

Copy necessary files.

  • Copy module/contrib/redis/example.services.yml to sites/default/redis.services.yml

Add configureations to settings.php

$settings['redis.connection']['interface'] = 'Predis';
$settings['redis.connection']['host'] = 'redis';
$settings['redis.connection']['port'] = NULL;
$settings['cache']['default'] = 'cache.backend.redis';
$settings['container_yamls'][] = 'sites/default/redis.services.yml';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment