ehann/laravel-redis-store
Composer 安装命令:
composer require ehann/laravel-redis-store
包简介
Adds functionality to the built-in Cache's RedisStore.
README 文档
README
Why is this useful?
The RedisStore that comes with the Laravel Cache does not compress string values out of the box. The RedisStore in this package does. Caching string values can save a ton of memory and/or network bandwidth depending on cached item size and request frequency.
How do I use it?
Install the package...
composer require ehann/laravel-redis-store
Add a custom cache driver, like this...
public function boot() { Cache::extend('ehann-redis', function ($app) { return Cache::repository(new \Ehann\Cache\RedisStore( $app['redis'], $app['config']['cache.prefix'], $app['config']['cache.stores.redis.connection'] )); }); }
Add the ehann-redis custom driver to the redis store config in config/cache.php...
'stores' => [ 'redis' => [ 'driver' => 'ehann-redis', ], ],
统计信息
- 总下载量: 13.51k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 12
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-01-15