giacomomasseron / laravel-cache-when-db
Register cache you want to clean when something happens in the database
Fund package maintenance!
Giacomo Masseroni
Requires
- php: ^8.2
- illuminate/contracts: ^10.0||^11.0
Requires (Dev)
- larastan/larastan: ^2.9
- laravel/pint: ^1.14
- orchestra/testbench: ^9.0.0||^8.22.0
- phpunit/phpunit: ^10.1
README
Clean cache keys when you insert, update or delete some records of your database.
Installation
You can install the package via composer:
composer require giacomomasseron/laravel-cache-when-db
You can publish the config file with:
php artisan vendor:publish --tag="laravel-cache-when-db"
This is the contents of the published config file:
return [ /** * Define Cache keys to clean when one the tables of the array is updated * * [ * 'cache_key' => [ * 'database_table', * 'database_table', * ], * ] */ ];
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.