Introduce a custom Twig loader that uses a cache key based on the file's last modification time when a website is being built during watch mode; this fixes parent templates not being recompiled during the watch command. Additionally, I've moved the project to a new file watcher, which has support for using external file watching tools in addition to polling the file system.
Lastly, I've added a --clean-cache option that will clear the .stakx-cache folder. The cache folder is automatically cleared when build is run but it no longer automatically be cleared when watch is run to help speed up build times.
Check List
[x] Added appropriate PhpDoc for modifications
[ ] Added unit test to ensure fix works as intended
Summary
Description
Introduce a custom Twig loader that uses a cache key based on the file's last modification time when a website is being built during
watch
mode; this fixes parent templates not being recompiled during thewatch
command. Additionally, I've moved the project to a new file watcher, which has support for using external file watching tools in addition to polling the file system.Lastly, I've added a
--clean-cache
option that will clear the.stakx-cache
folder. The cache folder is automatically cleared whenbuild
is run but it no longer automatically be cleared whenwatch
is run to help speed up build times.Check List