request controller

This commit is contained in:
Rolux 2010-01-27 18:04:27 +05:30
parent a19578af35
commit 9e438c4990

View file

@ -412,8 +412,12 @@ requires
} }
}, },
emptyCache: function() {
cache = {};
}
options: function(options) { options: function(options) {
return Ox.getset(self.options, options, $.noop(), this) return Ox.getset(self.options, options, $.noop(), this);
}, },
send: function(options) { send: function(options) {
@ -510,7 +514,7 @@ requires
}; };
if (cache[req] && (options.age == -1 || options.age > Ox.getTime() - cache[req].time)) { if (cache[req] && (options.age == -1 || options.age > Ox.getTime() - cache[req].time)) {
setTimeout(function() { setTimeout(function() {
callback(options.id, cache[req].data, callback); callback(cache[req].data, callback);
}, 0); }, 0);
} else { } else {
pending[options.id] = true; pending[options.id] = true;