So then when I'm on some kind of blocked WiFi and nothing resolves, and I switch to a properly working WiFi your code will continue to fail?
It's not so simple to cache misses - you don't know if it's a real miss or some kind of error.
For example if Facebook cached the miss, then even when they are back up nothing would connect.