allow some filtering when clearing the requests cache
This commit is contained in:
parent
211884740d
commit
ad51a360cd
1 changed files with 8 additions and 2 deletions
|
@ -49,8 +49,14 @@ Ox.Request = function(options) {
|
|||
clearCache <f> clear cached results
|
||||
() -> <u> ...
|
||||
@*/
|
||||
clearCache: function() {
|
||||
clearCache: function(query) {
|
||||
if (!query) {
|
||||
cache = {};
|
||||
} else {
|
||||
cache = Ox.filter(cache, function(val, key) {
|
||||
return key.indexOf(query) == -1;
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
_leakCache: function() {
|
||||
|
|
Loading…
Reference in a new issue