开发者

Lazy loading dojo modules: does dojo check its cache?

开发者 https://www.devze.com 2022-12-26 13:06 出处:网络
When evaluating dojo.require statements, dojo tracks which modules and resources have been required and doesn\'t download th开发者_如何学Goem many times, but takes them from cache.

When evaluating dojo.require statements, dojo tracks which modules and resources have been required and doesn't download th开发者_如何学Goem 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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号