In Chapter 5, Durandal – the Knockout Framework, we covered the basic and common uses of Durandal's composition system. This section will cover further composition techniques such as caching, transitions, and composition mode.
By default, the view rendered by the composition binding is discarded when the composed module is changed. This results in the DOM contents of the composition binding always being only the current module's view. The
cacheView option on the composed binding will change this behavior so that Durandal can keep any view composed. If a module is reactivated using the same object that is already bound to a view, it will not be recreated. Both the
router bindings have this option: