^ If we make things so that any changes to the files in the templates require a purge of the cache there's even a better optimization that can be made.
Instead of inserting there the function (or method) like I did, we could just replace all text with the correct path to the file. If that file has disappeared then it requires a purge of the cache. We just need to evaluate if we need that dynamic in every page load (slower, more flexible) or static, the path is saved directly to the file (faster, if the conditions change, it requires a purge of the cache).


