-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Download only as needed #335
base: master
Are you sure you want to change the base?
Conversation
This is useful, for instance, when a download is interrupted. As some modern games can be as large as 100+ GB, and while steam has many, many chunks and URLs to check, this still speeds up the process of resuming the download, or skipping games that the cache already has. |
Thanks for the pr. I'll probably be able to take a look at this in the next few days or so. Will let you know any feedback then |
After some updates have released, i have confirmed my patch holds up to those as well, only downloading the changed stuff, and skipping by the rest that the cache already has. Hope this makes it in. |
I've finally been table to take some time to check this out, and test it out a bit. It does work and certainly speeds up things by a lot! However I have two reservations about including these changes:
|
Hmm perhaps put this behind a command line toggle then to not break the default behavior of other commands? |
I can modify this to put it behind a command line toggle, or just fix it so that benchmark and other such commands will not utilize the HEAD request check. |
Are you on discord? Would you maybe be interested in joining the lancache discord and chatting about this a bit there? |
Yea i'm on discord. |
cf53203
to
adb8c9c
Compare
I updated the files in the PR. I added a command line toggle to turn on skipping chunks that have already been downloaded. Updated it to be compatible with upstream/master. By default, this will use the current behavior of not skipping chunks. I wasn't sure where the best place for this toggle would've been. Nor was i sure what the best nickname for the flag was. |
This PR adds a small change that makes prefill do a HEAD request, and check if
X-Cache-Status
is set toHIT
. If it is, then it can safely skip and move onto the next chunk. Avoids unnecessary downloads from the cache server.