Template Cache

108 views
Skip to first unread message

Michael Remme

unread,
Mar 4, 2015, 8:19:26 AM3/4/15
to ve...@googlegroups.com
When i am using Thymeleaf, i have to restart to get changes in modified templates, cause by default the cache is activated in the TemplateResolver. Currently i did not find a way to change that. Could it be an idea to make the TemplateResolver accessable?

Tim Fox

unread,
Mar 4, 2015, 10:46:32 AM3/4/15
to ve...@googlegroups.com
We accept PRs :)


On 04/03/15 13:19, Michael Remme wrote:
When i am using Thymeleaf, i have to restart to get changes in modified templates, cause by default the cache is activated in the TemplateResolver. Currently i did not find a way to change that. Could it be an idea to make the TemplateResolver accessable?
--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Remme

unread,
Mar 4, 2015, 2:15:14 PM3/4/15
to ve...@googlegroups.com
ok, done :-)


Paulo Lopes

unread,
Mar 8, 2015, 7:01:34 AM3/8/15
to ve...@googlegroups.com


On Wednesday, March 4, 2015 at 2:19:26 PM UTC+1, Michael Remme wrote:
When i am using Thymeleaf, i have to restart to get changes in modified templates, cause by default the cache is activated in the TemplateResolver. Currently i did not find a way to change that. Could it be an idea to make the TemplateResolver accessable?

Just my 2cts don't force the cache to false because once you go to production you might want to have it on in order to speed up you app since in prod i guess your templates will never change... 

Jez P

unread,
Mar 8, 2015, 7:47:05 AM3/8/15
to ve...@googlegroups.com
Why not have a JVM property for disabling the cache, with caching enabled by default? That way you can run with cache disabled while developing (also useful when modifying web resources in general such as javascript) and then deploy into production without that property set.

As things stand Javascript files, CSS etc are also cached while developing (FileResolver I think does this), and it would generally be helpful for them not to be. 

Michael Remme

unread,
Mar 9, 2015, 1:29:53 PM3/9/15
to ve...@googlegroups.com
yes, in production this is true. But restarting vertx each time when i edited a template to be able to see the changes isn't so funny neither :-)

Michael Remme

unread,
Mar 9, 2015, 1:33:52 PM3/9/15
to ve...@googlegroups.com
would be an idea, but then i have the same problem again, if i want to change another property of thymeleaf. In fact in the meantime i started to add some init methods of thymeleaf into the ThymelafTemplateEngine
Reply all
Reply to author
Forward
0 new messages