add two retry strategies to allow requests to timeout gracefully (#8080)
Certain APIs should time out in different ways. For the cache, we want
to retry connection attempts but not retry upload timeouts as a retry is
unlikely to change your connection speed.