drupal/predis

该包最新版本(0.1)的许可证信息不可用。

维护者

详细信息

github.com/dmouse/predis

源代码

问题

安装次数: 3,410

依赖者: 0

建议者: 0

安全性: 0

星标: 0

关注者: 2

分支: 0

开放问题: 0

类型:drupal 模块

0.1 2014-07-13 02:41 UTC

This package is auto-updated.

Last update: 2024-08-24 04:41:15 UTC


README

本模块通过 Predis 库提供 Redis 服务连接,此模块仅提供供其他模块使用的服务。

安装方法

此模块需要在根目录的 composer.json 中包含 predis

$ composer require predis/predis:~0.8.0

使用方法

# 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();
}
// ...

相关模块