Use Spring Cache Abstraction #89

candrews opened this Issue Jul 22, 2015 · 1 comment


None yet

2 participants


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: It seems like it would be a fairly simple change to SpringTemplateEngine - perhaps this could be in Thymeleaf 3.0?


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.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment