How to Develop Blade Templates in Sage without Constantly Restarting yarn dev or Clearing Cache?

Hi everyone!

I’ve been working with Sage 10 and Acorn for my WordPress theme development, and I find myself constantly restarting yarn dev or clearing the cache using wp acorn cache:clear every time I make changes to my Blade templates. I’d like to know if there’s a more efficient way to develop Blade templates without having to go through this process each time.

Has anyone faced similar issues? Are there any best practices or tips to make the Blade development process smoother in Sage? Any help or suggestions would be greatly appreciated!

Thanks in advance!

1 Like

:thinking: acorn uses laravel for caching.
The cache driver can be set in acorn using the CACHE_DRIVER environment variable:

By default it is set to file.

So you may set CACHE_DRIVER to none to disable caching in the config/environments/development.php of the Bedrock (1.22.2) site (or elsewhere for development, when Bedrock is not used).

I have not tested this, but it makes sense. If this indeed works, it may be a nice addition to Sage (depending on environment).

2 Likes