drupal / predis
Installs: 3 410
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:drupal-module
Requires
- predis/predis: dev-master
This package is auto-updated.
Last update: 2024-11-24 05:08:18 UTC
README
This module provides a service connection to Redis using Predis library, this module only provides a service to be used in other modules.
How to install
This module need predis in the root composer.json
$ composer require predis/predis:~0.8.0
How to use
# my_module.services.yml services: my_module.connection: class: Drupal\my_module\Connection arguments: ['@predis.connection']
use Drupal\predis\RedisConnectionInterface; // ... public function __construct(RedisConnectionInterface $redis) { $this->redis = $redis->getConnection(); } // ...