hogan-cached
Express.js view engine that renders Mustache with Hogan.js and caches compiled templates for more speed
- Designed for Express 4.x
- Cache: Compiles once. Renders faster.
- Partials support
- Lambda support
- All of mustache(5) features
Examples
var express = ;var app = ; app;app; app; app;
Partials
// Register globallyapp; app;
{{> header}} {{> content}}
Lambda
app;
{{#center}}I'm centered!{{/center}} {{#logged_in}}You are logged in!{{/logged_in}}
Options
Customizable Hogan.js options
// Sets the delimiters to <% %> instead of {{ }}app;
Cache
You can clear the cache anytime with clearCache
var engine = ; app;app; // ... engine;
You can also disable the cache for dev environment
app;
More examples?
Check out test/test.js