Laravel Clear Application Cache
To clear your Laravel application cache you can run the command below.
php artisan cache:clear
Laravel Clear Cache for Specific Store
You can also make use of multiple cache stores in Laravel and depending on the types of the stores, you can specify it using the "--store=" flag.
php artisan cache:clear --store=memcached php artisan cache:clear --store=redis
Laravel Clear Cache for Specific Tags/22)
If the cache is tagged then you can run the cache:clear with the "--tags=" flag.
php artisan cache:clear --tags=tag1,tag2,tag3
Programmatically Clear Cache in Laravel
Otherwise, you can also programmatically run the cache clear by running the code below.
<?php cache()->flush(); cache()->store('redis')->tags('tag1')->flush();
Leave a reply