allegro / handlebars-spring-boot-starter

Spring Boot auto-configuration for Handlebars
Apache License 2.0
108 stars 27 forks source link

Disabling the template caching is not working #20

Closed brsanthu closed 8 years ago

brsanthu commented 8 years ago

Documentation says that we need to set handlebars.cache=false in the application.properties, which we have done but it is still being cached. Looked at the code, and it looks like it is hardcoded to setCache(true).

Can you please suggest ways to disable cache or make that configurable?

platan commented 8 years ago

As you can see in the documentation, Handlebars loads .hbs files from classpath (handlebars.prefix: classpath:templates/) by default. When you edit .hbs files in src/main/resources/templates, Handlebars does not see these changes, because these files are not copied to build/... directory (classpath). There are 2 simple solutions (I assume you working with Intellij IDEA):

Please look here for more information.

brsanthu commented 8 years ago

That was exactly the issue (dreaded Intellij no make on save issue). I setup a macro to save and make on Ctrl+S and is working fine.

With that said, what does this config do? handlebars.cache=false

sant123 commented 6 years ago

I have this configuration working in Netbeans

handlebars.suffix=.html
handlebars.cache=false