Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dmouse/predis
Drupal module to use predis
https://github.com/dmouse/predis
Last synced: 10 days ago
JSON representation
Drupal module to use predis
- Host: GitHub
- URL: https://github.com/dmouse/predis
- Owner: dmouse
- Created: 2014-07-01T16:59:56.000Z (over 10 years ago)
- Default Branch: 8.x-1.x
- Last Pushed: 2014-07-22T19:20:37.000Z (over 10 years ago)
- Last Synced: 2024-11-08T00:07:11.671Z (2 months ago)
- Language: PHP
- Size: 188 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Predis module
=============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
```bash
$ composer require predis/predis:~0.8.0
```### How to use
```yaml
# my_module.services.yml
services:
my_module.connection:
class: Drupal\my_module\Connection
arguments: ['@predis.connection']
``````php
use Drupal\predis\RedisConnectionInterface;
// ...
public function __construct(RedisConnectionInterface $redis) {
$this->redis = $redis->getConnection();
}
// ...
```#### Related modules:
* https://www.drupal.org/project/redis
* https://www.drupal.org/project/redis_queue