How does Laravel Views Cache works? How does Laravel Views Cache works? php php

How does Laravel Views Cache works?


By default all views are compiled/cached. You can define a path where to store compiled version in app/config/view.php. When Laravel framework tries to compile a view it check the modification date of the source view file and compiled version if the last one exists. If the compiled file is older than a the source file Laravel recompiled the view and store it as a new cached version of the source file. It happens every time when you deploy a new version of the code.