apt has well known support for preserving partial downloads when stopped and restarted, resuming where it left off when launched again, using range requests for this for HTTP[S] sources. It would be good if we could efficiently support that same use case.
- Handle range requests for parts of a fully cached resource
- When client aborts while downloading something that is a cache miss, stop the upstream download and keep the partial download. When the resource is requested again, immediately attempt a range request for the missing part, and if the upstream does not support range requests toss the existing cached content and handle as a miss on the upstream side.
- The case where a client range requests for a part of a partially cached resource that starts after the part we have should be sufficiently rare that I'm fine with just doing the upstream download from where we left off as above and just stalling the client response (other than the headers) until the download gets to the part we are serving it
apthas well known support for preserving partial downloads when stopped and restarted, resuming where it left off when launched again, using range requests for this for HTTP[S] sources. It would be good if we could efficiently support that same use case.