Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel cache driver with compression.

This driver provides ability to compress and decompress Redis data.

Installation

You can install the package via composer:

composer require dimafe6/redis-compressed-cache

You can publish the config file with:

php artisan vendor:publish --tag="redis-compressed-cache-config"

This is the contents of the published config file:

return [
    'prefix'          => config('cache.prefix'),
    'connection'      => env('REDIS_COMPRESSED_CACHE_CONNECTION', 'cache'),
    'lock_connection' => env('REDIS_COMPRESSED_CACHE_LOCK_CONNECTION', 'default'),
    'enabled'         => env('REDIS_COMPRESSED_CACHE_ENABLED', true),
];

Usage

Add the redis-compressed custom driver to the redis store config in config/cache.php:

'redis' => [
    'driver'          => 'redis-compressed',
    'connection'      => 'cache',
    'lock_connection' => 'default',
]

Or create a new store:

'redis-compressed' => [
    'driver'          => 'redis-compressed',
]

Credits

License

The MIT License (MIT). Please see License File for more information.

About

Laravel cache driver with compression

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages