question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Configuration Options for dropwizard-views-mustache

See original GitHub issue

The MustacheViewRenderer is caching templates forever so there’s no chance for hot-deployment during development. Would it make sense to provide an option to disable caching during development or to define a cache-lifetime?

This should be no big change for the MustacheViewRenderer but as far as I’ve seen there’s currently no way to pass any configuration to a ViewRenderer. ViewBundle#getViewConfiguration returns an empty Map. Am I missing something here?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
leflohcommented, Jan 18, 2016

Yes there is a code change required. I would suggest to add a cache property to the view configuration:

views:
  .mustache:
    cache: false

The ViewRenderer implementations would need to bypass the LoadingCache in this case. Shall I provide a pull request?

0reactions
acwwatcommented, Nov 13, 2016

Thanks all.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dropwizard Views
The dropwizard-views-mustache & dropwizard-views-freemarker modules provide you with simple, fast HTML views using either FreeMarker or Mustache.
Read more >
Dropwizard Views
The dropwizard-views-mustache & dropwizard-views-freemarker modules provides you with simple, fast HTML views using either FreeMarker or Mustache.
Read more >
ViewBundle (Dropwizard Views 1.1.7 API) - javadoc.io
Class ViewBundle<T extends Configuration>​​ A Bundle , which by default, enables the rendering of FreeMarker & Mustache views by your application. The "profile. ......
Read more >
io.dropwizard.views java code examples - Tabnine
Best Java code snippets using io.dropwizard.views (Showing top 20 results out of 315) · View.<init>(...) · ViewBundle.run(...) · MustacheViewRenderer.isRenderable( ...
Read more >
Dropwizard-guicey - Server Pages
Where freemarker and mustache are keys from installed template renderer io.dropwizard.views.ViewRenderer#getConfigurationKey() .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found