I am running Artisan::call('cache:clear'); to clear the cache when the job start.
I am getting following error sometimes and sometimes it works:
Failed to clear cache. Make sure you have the appropriate permissions.
I am running Artisan::call('cache:clear'); to clear the cache when the job start.
I am getting following error sometimes and sometimes it works:
Failed to clear cache. Make sure you have the appropriate permissions.
It's possible you have more than one request running at the exact same time and the files it's trying to access are inaccessible. Rather than running a console command, why not clear the cache of the specific thing you need to be cleared? It's definitely against the spirit of Laravel's caching system to be clearing it every time you're running an item in the queue.