How to Clear cache in shared hosting server in Laravel 5

two dates Laravel 5 MAKE Create Custom helpers

Now Clear cache in shared hosting server in Laravel 5. Clear cache in laravel using Artisan Command. if you like this Question  solution then add your review in comment and if you have any question for that then feel free to add in comment or Contact Us

Here is step for Clear cache in shared hosting server in Laravel 5

1)  First Open Command Prompt

2) Go to your Project Folder

3) run Below Command

php artisan cache:clear

Now your Cache is Clear. Also you can use Other Method.php artisan cache:clear might not always work in case of FileStore cache as the user who is executing the artisan command might not have write permissions to the cache files/directories. Usually the cached files are created by the webserver user who is not necessarily the same you use to run artisan

foreach (Cache::getMemory() as $cacheKey => $cacheValue)
{

    Cache::forget($cacheKey);
}

Update:

Cache::flush();

Also Read : Laravel Interview Questions and Answers

Leave a Reply