In every application, performance matters. That's why having our templates available in the cache will definitely improve the speed of the rendering process in future calls.
Marionette has an object called
TemplateCache that is used by the
Renderer object. This means that all of our templates are stored in this
TemplateCache object and to start making use of it, we just need to call the
get method. Internally, this method will confirm whether it already has the template and then return it; alternatively, it will load the template from DOM and will return the template so that we can use it, but it will also keep a reference of it. Hence in the subsequent call, we will get the cached ...