Sorry if this seems trivial, but I need to be sure:

Where does Laravel 6 store the view cache? On the cache server or in the storage folder?

Does it get stored in my redis if I set it as the cache server?


The view cache is always stored via the filesystem in storage/framework/views.

You can verify this by setting your cache to something like Redis, doing php artisan view:clear, and observing that folder after visiting a couple Blade views in the browser. Files will show up even when you're not using the file-based driver.

If you're on a multi-server load balanced setup, be aware this means you'll need to clear the view cache on each server independently. (Probably as part of your deployment process.)

  • Thanks Mate! How about if I create a fileserver with a shared storage folder, so the two or more webservers will have the exact same content in the storage folder? – Imre Bertalan Jan 16 at 8:14
  • @ImreBertalan I think that'd be adding needless complexity and a big single-point-of-failure. There's no real downside to the filesystem cache for views - it's going to be faster than any of the other cache drivers, and clearing it on deployment is easily automated. – ceejayoz Jan 16 at 13:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.