allow some filtering when clearing the requests cache

This commit is contained in:
rlx 2011-09-19 13:34:17 +00:00
parent 211884740d
commit ad51a360cd

View file

@ -49,8 +49,14 @@ Ox.Request = function(options) {
clearCache <f> clear cached results clearCache <f> clear cached results
() -> <u> ... () -> <u> ...
@*/ @*/
clearCache: function() { clearCache: function(query) {
cache = {}; if (!query) {
cache = {};
} else {
cache = Ox.filter(cache, function(val, key) {
return key.indexOf(query) == -1;
});
}
}, },
_leakCache: function() { _leakCache: function() {