The package is developed for make seamless deploys. You can delete your cache by adding the desired redis keys to the migration file.
- Laravel >= 5.x
- PHP >= 7.1
Install via composer
composer require haydarsahin/cache-migrationRun migration for creating cache-migrations table.
php artisan migrateThe cache migrations is analogous with normal migration.
Create a migration file.
php artisan make:cache-migration UsersCacheForgetType pattern or patterns which you want to forget to patterns array.
<?php
class UserCacheForget
{
/*
|--------------------------------------------------------------------------
| Cache Migration File
|--------------------------------------------------------------------------
|
| Redis keys that you wish to clear should be added to the patterns array.
| Invalid patterns: '*', less than 3 characters.
|
*/
public $patterns = [
'users:*',
'report:users:*:performance:*:dateRange:*:volumes',
'specificCacheKey:101:userId'
];
}Run pending migrations manually or add this code to your deployment pipeline.
php artisan cache:migratecomposer testPlease see CHANGELOG for more information on what has changed recently.
If you discover any security related issues, please email instead of using the issue tracker.
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.