定制 zxin/think-redis 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

zxin/think-redis

最新稳定版本:v2.2.1

Composer 安装命令:

composer require zxin/think-redis

包简介

think redis

README 文档

README

Latest Stable Version License workflows coverage

快速使用

安装

composer require zxin/think-redis

普通环境下直接使用。

\Zxin\Think\Redis\RedisManager::store()->get('xxxx');

协程环境下使用方法与普通环境一致,但为了更优雅的退出,在workerStopworkerExit下调用以下代码。

\Zxin\Think\Redis\RedisManager::destroy();

替换Cache中的redis驱动以提供全局redis管理服务

  1. 先在config/redis.php配置文件声明一个连接
  2. config/cache.php配置文件中需要提供redis连接的位置替换驱动
[
    'default' => 'test',
    'stores' => [
        'test' => [
            'type' => \Zxin\Think\Redis\CacheDriver::class,
            'connection' => 'main_redis', // 在redis统一配置中声明的有效连接
            ...
        ],
        ...
    ]
]

统计信息

  • 总下载量: 2.99k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2020-08-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固