Open candrews opened 9 years ago
I'm leaving this in the Wish List for now. I agree that integrating with Spring's own caching infrastructure looks interesting, but the nature of Thymeleaf's cached artifacts (mostly templates --- expressions are not a problem) and the impossibility to manage them as serializable structures might end up posing a series of problems with some cache implementations.
So for now I prefer to leave this under the direct responsibility of Thymeleaf, but I don't want to discard it, so let's leave it as an idea for future versions.
Thanks.
In my opinion, when SpringTemplateEngine is used, one would expect Thymeleaf to use Spring's cache abstraction (SpringTemplateEngine already causes Thymeleaf to use other Spring features/components, so why not cache?).
Can this feature be added? I've figured out how to do that and written up how to make that happen, along with the code: http://candrews.integralblue.com/2015/07/using-spring-cache-as-the-thymeleaf-cache/ It seems like it would be a fairly simple change to SpringTemplateEngine - perhaps this could be in Thymeleaf 3.0?