I am not really sure if this is a bug or a feature, but if you render some template with cache enabled and then you remove the source file, the cached version is still being used. I think that this depends on your interpretation of what it means for a cached template to be expired.
Steps To Reproduce
render some template with cache enabled
remove the source file
render the same path again
Expected Behavior
Exception 'missing template file'
Possible Solution
The function isExpired in Latte\Loaders\FileLoader is already being called, however, it only checks the modification time of the source file and not its existence. I can use my own FileLoader that fixes this, but why this isn't somehow possible in default?
The text was updated successfully, but these errors were encountered:
Version: 2.4.8
Bug Description
I am not really sure if this is a bug or a feature, but if you render some template with cache enabled and then you remove the source file, the cached version is still being used. I think that this depends on your interpretation of what it means for a cached template to be expired.
Steps To Reproduce
Expected Behavior
Exception 'missing template file'
Possible Solution
The function isExpired in Latte\Loaders\FileLoader is already being called, however, it only checks the modification time of the source file and not its existence. I can use my own FileLoader that fixes this, but why this isn't somehow possible in default?
The text was updated successfully, but these errors were encountered: