It appears to be a bug in the NSURLCache
. When I detect that the problem has happened, I do the following and try again.
[[NSURLCache sharedURLCache] removeCachedResponseForRequest:self.request];
Once I have done that, the problem does not happen again. It seems to heal the cache. I saw this on iOS5.0, and since I can no longer reproduce, I don't know if it happens on newer OS'es.