If we use the setting isCached: false, Vision will read & recompile top-level templates each time render is called. This is great!
But, helpers and partials are only ever read & registered on startup, so (for instance) given a handlebars template that makes heavy use of partials to break apart the view, changes to those partials will only appear after a full server restart.
Seems like it'd be expensive to reload every single partial & helper on every render call when isCached: false, but the alternative would be to listen to changes in partials in a plugin and manually call Handlebars.registerPartial on them. But that reaches way outside vision and feels weird.
Another idea would be to scan a template for partial names, and selectively recompile and reregister just those partials if caching is turned off.
Thoughts?
If we use the setting
isCached: false, Vision will read & recompile top-level templates each timerenderis called. This is great!But, helpers and partials are only ever read & registered on startup, so (for instance) given a handlebars template that makes heavy use of partials to break apart the view, changes to those partials will only appear after a full server restart.
Seems like it'd be expensive to reload every single partial & helper on every
rendercall whenisCached: false, but the alternative would be to listen to changes in partials in a plugin and manually callHandlebars.registerPartialon them. But that reaches way outside vision and feels weird.Another idea would be to scan a template for partial names, and selectively recompile and reregister just those partials if caching is turned off.
Thoughts?