PHP code example of haydarsahin / cache-migration
1. Go to this page and download the library: Download haydarsahin/cache-migration library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
haydarsahin / cache-migration example snippets
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'
];
}
bash
php artisan migrate
bash
php artisan make:cache-migration UsersCacheForget
bash
php artisan cache:migrate