How to disable the Cache in Laravel

Sometimes its necessary to disable the caching in Laravel. To do so a new cache-driver “none” must be added to the cache-configuration-file in config/cache.php

After that you have to set this cache-driver in your .env-File and you Cache is disabled

Edit .env and change the line
CACHE_DRIVER=file
to
CACHE_DRIVER=none

Clearing some Caches in Laravel

Clear Application Cache:

Clear Route Cache

Throws an error if CACHE_DRIVER=none

Clear Configuration Cache

Throws an error if CACHE_DRIVER=none

 Clear Compiled Views Cache

Throws an error if CACHE_DRIVER=none