Delete cached requests on error.

This commit is contained in:
Nicolas Stepien 2012-06-20 22:57:36 +02:00
parent ea73f35be7
commit f07b9f1dfa
2 changed files with 4 additions and 0 deletions

View File

@ -371,6 +371,9 @@
},
onabort: function() {
return delete $.cache.requests[url];
},
onerror: function() {
return delete $.cache.requests[url];
}
}, {
responseType: responseType

View File

@ -299,6 +299,7 @@ $.extend $,
req = $.ajax url, {
onload: -> cb.call @ for cb in @callbacks
onabort: -> delete $.cache.requests[url]
onerror: -> delete $.cache.requests[url]
}, {
responseType: responseType
}