giacomomasseron/laravel-cache-when-db

Register cache you want to clean when something happens in the database

v1.0.0 2024-11-03 15:46 UTC

This package is auto-updated.

Last update: 2024-11-22 16:15:19 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

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.