rapidez/laravel-multi-cache
Larablocks Analysis
rapidez/laravel-multi-cache works with Laravel 12 and 13 (latest release 2.2.0, Apr 21, 2026).
Laravel 10 and 11 in earlier releases.
Recommendation checks
Solid choiceSolid choice: maintained and up to date, meets 2 of 4 checks; below the bar for Recommended on use.
- Works with Laravel 13, the current version
- Released in the last 12 months (Apr 21, 2026)
- 5,818 downloads a month (needs 10,000)
- 3 GitHub stars (needs 100)
State
Maintained- Last stable release: Apr 21, 2026.
- 1 release in the last 12 months.
- First released: Oct 15, 2024.
- Monthly downloads: 5,818.
- 0 open issues on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Nov 30, 2026.
| Install | |
|---|---|
composer require rapidez/laravel-multi-cache |
|
| Latest Version: | 2.2.0 |
| PHP: | >=8.2 |
| Laravel: | 12 · 13 |
| Older releases: | 10 · 11 |
| License: | MIT |
| Last Updated: | May 4, 2026 |
| Links: | GitHub · Packagist |
Laravel Multi Cache
Allows you to use multiple Laravel cache stores as one. Retrieves items from the first cache they are found in.
An example use is to have an array cache and Redis cache. Fetch items from the array cache first (faster), and from Redis if the key was not found. The value will be stored in the array cache if it was found in Redis.
Installation
composer require rapidez/laravel-multi-cache
The service provider will autoload, if you have disabled this add this to your config/app.php providers array:
Rapidez\LaravelMultiCache\MultiStoreServiceProvider::class
Add the multi store to your config/cache.php stores array:
'stores' => [
'array' => [
'driver' => 'array',
],
'database' => [
'driver' => 'database',
'table' => 'cache',
'connection' => null,
],
'redis' => [
'driver' => 'redis',
'connection' => 'redis-cache',
],
'multi' => [
'driver' => 'multi',
'stores' => [
'array',
'redis',
'database'
],
'sync_missed_stores' => true,
]
],
Set your CACHE_DRIVER in .env:
CACHE_DRIVER=multi
Usage
The cache implements the standard cache interface, so you use all the normal get() and put() methods.
get($key)
Returns the value from the first store $key is found in (in the order defined in stores). The value will be saved in any higher 'stores'.
e.g. If the value is not found it array, but is in redis, the value from redis will be returned and put in array, but it will not be put in database.
This behaviour can be disabled by setting sync_missed_stores => false in config.
put($key, $value, $minutes)
Stores an item in all of the stores.
All of the other methods (increment(), forget(), flush(), etc.) perform the operation on all of the stores.
Related Packages
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 2.2.0 | >=8.2 | ^12.0| | MIT | |
| 2.1.0 | >=8.2 | ^11.1| | MIT | |
| 2.0.0 | >=8.2 | ^11.1| | MIT | |
| 1.0.0 | >=8.1 | ^10.0 || | MIT |