承接 pdeio/redis-driver-fallback 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

pdeio/redis-driver-fallback

最新稳定版本:v1.0.0

Composer 安装命令:

composer require pdeio/redis-driver-fallback

包简介

When the redis server stops, a second cache driver starts working. Laravel's cache can be cleared whenever the redis server is returned or the second cache driver is started. In this way, the cache system remains synchronized without the problem of loading the old cache registers.

README 文档

README

Version License

When the redis server stops, a second cache driver starts working. Laravel's cache can be cleared whenever the redis server is returned or the second cache driver is started. In this way, the cache system remains synchronized without the problem of loading the old cache registers.

Contents

Installation

  1. In order to install Redis Drive Fallback, just run:
composer require pdeio/redis-driver-fallback
  1. [OPTIONAL] To create the configuration file (config/redis-driver-fallback.php) run:
php artisan vendor:publish --provider="Pdeio\RedisDriverFallback\RedisDriverServiceProvider"

Configuration

Set the property values in the config/redis-driver-fallback.php.

/*
|--------------------------------------------------------------------------
| Fallback ON / OFF
|--------------------------------------------------------------------------
|
|
| Enable / disable the redis driver fallback to test if it is working.
|
| The Redis driver fallback only works if the selected cache driver is set to redis,
| otherwise even if this option is set to on, only the default laravel cache manager
| will works.
|
*/

'fallback_turn_on' => true,


/*
|--------------------------------------------------------------------------
| Cache Driver Fallback
|--------------------------------------------------------------------------
|
| This option controls the fallback cachedriver that temporarily replaces the redis cache.
|
| Supported: "apc", "array", "database", "file",
|            "memcached", "dynamodb"
|
*/

'fallback_driver' => 'file',

/*
|--------------------------------------------------------------------------
| Synchronization mode
|--------------------------------------------------------------------------
|
| Here it is possible to define the synchronization mode: when the redis server stops,
| cache of the new driver selected is cleared in order to remain updated.
| When the redis returns, the redis cache is cleared before running again.
| This way, you don't run the risk of downloading not updated data from the cache.
|
| Set true, to activate the synchronization mode.
*/

'sync_mode' => false,

/*
|--------------------------------------------------------------------------
| Alert email
|--------------------------------------------------------------------------
|
| You have the option to send yourself an email with a default text,
| whenever the redis server should fall.
|
| In case of problems with the mail service, it is possible to catch the error
| without interrupting the entire cache request. Set "catch_error" to true, so a
| log error will be saved in "app/storage/app/redis/mails_error.log" with more
| details. If you set this option to false, laravel will force to send e-mails
| and an error exception will interrupt the request with an error exception page.
| It is recommended to leave this option on false, in development mode.
|
| You can edit the email template, if you want.
| In the folder "views/pdeio/redis-driver-fallback-email-template/alert.blade.php".
| If you delete this folder, the application does not crash, but cannot be sent
| any email from this package. You can use the redis event that is triggered when
| the redis server stops.
|
| It is recomended that you use the event ('redis.unvailable') which is fired
| whenever the redis stops working, to send the email through your controller
| and using your laravel queues.
*/

'email_config' => [
    'send_email' => false,
    'to' => 'email@email.com',
    'catch_error' => false,
]

License

Redis Driver Fallback is free software distributed under the terms of the MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-04-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固