[jQuery] disable ajax cache selectively depending on response?
Don't know if this is possible:
In an application I maintain AJAX requests are send to the server
which integrate the result in the current page. As far as I understand
the jQuery docs, these responses are cached (at least if they were
successful).
My Problem now: Though the http status code of the response indicates
success the requested operation still might have failed and generated
only a proper status message.
In these cases (I just need a regexp on the html returned to find out)
I'd like to tell jQuery not to cache this particular response. So that
if the user fires the ajax event again a new request is send to the
server (which this time might succeed).
On the other hand the requests require quite some processing so I
don't want to disable jQuerys caching altogether.
I know I could just disable the jQuery cache, store the successful
results somewhere in the DOM (keeping book about them myself) and
resend the failed requests - but I might be reinventing the wheel
here...
Thx
Heiko