calvinlam/laravel-multiple-cache-driver

将缓存数据存储到Redis和数据库

dev-master 2020-09-22 09:06 UTC

This package is auto-updated.

Last update: 2024-09-22 17:49:51 UTC


README

将您的数据缓存到Redis和数据库。除非为空,否则从Redis获取数据。

要求

  • Laravel 6.0+
  • Redis
  • MySQL

安装

composer require 
  1. 需要这个包
  2. CacheServiceProvider 添加到 config/app.php 中的 Laravel 服务提供者。
  3. config/cache.php 中将您的缓存驱动程序更改为 multiple-driver,如下所示:
'stores' => [
    'redis' =>[
        'driver' => 'multiple-driver',
        ...
    ],
],