定制 shashandr/laravel-swoole-redis 二次开发

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

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

shashandr/laravel-swoole-redis

最新稳定版本:1.0.0

Composer 安装命令:

composer require shashandr/laravel-swoole-redis

包简介

Laravel package to provide swoole redis pool integration, Laravel redis pool cache and session driver.

README 文档

README

Default Laravel redis connection may cause errors when running in Swoole coroutines.
This package adds support of Swoole RedisPool as a cache and session driver for Laravel.
This is a fork of antyblin/laravel-swoole-redis package, original idea belongs to https://github.com/antyblin.

Installation

Step 1:

Install package

composer require shashandr/laravel-swoole-redis

Step 2:

Add redis_pool store to the stores section in config/cache.php:

    'redis_pool' => [
        'driver' => 'redis',
        'connection' => 'default',
    ],

Step 3:

Change your redis driver or session driver to redis_pool in your .env file and that is it.

Config

You may add additional parameter 'pool_size' to the redis section in config/database.php. This parameter sets maximum quantity of connections in RedisPool.

    'default' => [
        'url' => env('REDIS_URL'),
        'host' => env('REDIS_HOST'),
        'password' => env('REDIS_PASSWORD'),
        'port' => env('REDIS_PORT'),
        'database' => env('REDIS_CACHE_DB'),
        'pool_size' => env('REDIS_POOL_SIZE', 64)
    ],

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-11-12