1
0
Fork 0
forked from 0x2620/oxjs

fix a bug related to clearing the requests cache

This commit is contained in:
rlx 2011-10-29 12:32:55 +00:00
commit 7415b72037
3 changed files with 23 additions and 13 deletions

View file

@ -119,8 +119,9 @@ Ox.Request = function(options) {
options.age == -1
|| options.age > +new Date() - cache[req].time
)) {
var data = cache[req].data;
setTimeout(function() {
callback && callback(cache[req].data);
callback && callback(data);
}, 0);
} else {
pending[options.id] = true;