sps / mustache-spring-view

java spring framework mvc view for Mustache.js templates
68 stars 31 forks source link

cache doesn't effect? #22

Closed zhengzhiqiang closed 8 years ago

zhengzhiqiang commented 9 years ago

hello,when i set the property 'cache' false,it doen't effect.I find it get template from cache always.is it?

YacheLee commented 8 years ago

I have the same issue... hope anyone can give some hints...

zhengzhiqiang commented 8 years ago

I found that,cache does't effect because except spring-view,mustache framework has cache also.So you need remove mustache cache by rewrite DefaultMustacheFactory in develop.I do it like so: protected LoadingCache<String, Mustache> createMustacheCache() { //one seconds expire return CacheBuilder.newBuilder().expireAfterWrite(1, TimeUnit.SECONDS).build(new MustacheCacheLoader()); }

YacheLee commented 8 years ago

Thank you! It's very helpful for me to develop using mustache~~~