jquery-handlebars icon indicating copy to clipboard operation
jquery-handlebars copied to clipboard

Async Calls Won't Hit Cache

Open zschuessler opened this issue 11 years ago • 0 comments

My use case is that I'm calling the $.render method within a loop. This results in 30 or so render calls, none of which hit the cache, so 30 separate XHR requests are made.

The temporary fix I've implemented is to use async: false on the XHR request, but that's not an ideal solution.

Perhaps a method of preloading templates, or passing in configuration for the XHR, would be better suited.

zschuessler avatar Dec 10 '13 19:12 zschuessler