71104 / jquery-handlebars

A jQuery plugin to render Handlebars.js templates into elements
http://71104.github.io/jquery-handlebars
MIT License
100 stars 39 forks source link

Async Calls Won't Hit Cache #7

Open zschuessler opened 10 years ago

zschuessler commented 10 years ago

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.