Snippets

Clear All Cache in Laravel 9.x

Posted by I. B. Gd Pramana A. Putra, 28 Jun 22, last updated 17 Jul 22

This is a code snippet or command that you can use to clear all cache in your Laravel application.

php artisan optimize:clear

The following cache will be cleared:

  • Clear Laravel application cache
  • Clear Laravel route cache
  • Clear Laravel view cache
  • Clear Laravel session & cookies cache

Once you run the command above in your server terminal within Laravel app.

I love sharing code snippets as most of the time, a quick code example is what we're looking for instead of long-written articles. If you think my code snippets are helpful and save you a lot of time, please consider buying me a cup of coffee :)

Support me via · paypal · buymeacoffee · ko-fi · trakteer
Contributed Snippets
Answer & Responses
    No comments yet

Wanna write a response?

You have to login before write a comment to this post.