Reputation: 5403
When evaluating dojo.require
statements, dojo tracks which modules and resources have been required and doesn't download them many times, but takes them from cache.
But what if I require a module lazily, for example, when a button is clicked, - does dojo check its cache?
Upvotes: 1
Views: 1008
Reputation: 6766
Yes, the same mechanism is used to make sure a module is not loaded, during page load and after page load, when responding to dynamic events, as long as it is a normal dojo.require("my.module.name") call.
Upvotes: 4