定制 digitalnatives/craft3-illuminate-redis-adapter 二次开发

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

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

digitalnatives/craft3-illuminate-redis-adapter

最新稳定版本:1.4.0

Composer 安装命令:

composer require digitalnatives/craft3-illuminate-redis-adapter

包简介

Redis Cache based on Illuminate redis for CraftCMS 3|4

README 文档

README

Redis Cache based on Illuminate redis for CraftCMS 3

Installation

You can install this package using composer;

composer require digitalnatives/craft3-illuminate-redis-adapter

Choose an adapter

PHPredis (recommended)

For best performance we recommend using ext-phpredis

Config

return [
    'components' => [
        'cache' => [
            'class' => DigitalNatives\Cache\Redis::class,
            'defaultDuration' => 86400,
            'connection' => 'phpredis',
            'config' => [
                'host' => getenv('REDIS_HOST'),
                'port' => (int)getenv('REDIS_PORT'),
                'database' => getenv('REDIS_DB'),
                'connectTimeout' => 60,
                'readTimeout' => 60,
                'serializer' => \Redis::SERIALIZER_NONE
            ],
        ],
    ],
];

predis

When installing php extensions is not an option, predis is a very good option.

If you haven't installed predis, install it using composer;

composer require predis/predis

Config

return [
    'components' => [
        'cache' => [
            'class' => DigitalNatives\Cache\Redis::class,
            'defaultDuration' => 86400,
            'connection' => 'predis',
            'params' => [
                'host' => getenv('REDIS_HOST'),
                'port' => (int)getenv('REDIS_PORT'),
            ],
            'options' => [
                ['profile' => '5.0']
            ]           
        ],
    ],
];

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-05-09