Skip to content
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

Support local filesystem cache #341

Closed
lbruun opened this issue Jan 5, 2023 · 1 comment
Closed

Support local filesystem cache #341

lbruun opened this issue Jan 5, 2023 · 1 comment
Labels
help wanted Extra attention is needed
Milestone

Comments

@lbruun
Copy link

lbruun commented Jan 5, 2023

In reference to Optimize install-scripts in CI runs I suggest to add possibility to use a local filesystem cache.

Here's the background: CI systems normally have a "caching feature" which is really just some folder which is mounted on the filesystem when the job executes. It would be ideal if the .NET install scripts would support such feature in order to avoid constantly fetching the SDK package from the Internet.

Specifically I suggest a new optional parameter:

   --filesystem-cache   <path>
           If specified, the script will check first in this location before going to this Internet to fetch files. 
           By re-using this folder, repeated downloads of the same file can be avoided. 

I'm proposing this not as a way to do offline installs, but as a way to speedup the download-and-install experience. Thus, the script may still go to Internet to download smaller files (e.g. metadata files), but use the cache to avoid repeatedly downloading larger files.

@baronfel
Copy link
Member

baronfel commented Jan 5, 2023

This could be useful in abstract, but the team likely won't be prioritizing it. One of the prime use cases for this script is the setup-dotnet GitHub Action, and we find that the actual download step for a given SDK is less than 2s per run. Most time is spent extracting the archive (which isn't a simple extract operation because the SDK isn't truly side-by-side installable). On top of that, caches take a while to mount in such systems, and so any gain during download there would likely be spent in setup.

Having said that, I would certainly not be opposed to a contribution that added this. Presumably it would need to check SHAs of the local files against the SHA of the remote file to prevent re-download (using etags? is there a stable resource for the hashes of the SDKs)?

@baronfel baronfel added the help wanted Extra attention is needed label Jan 5, 2023
@baronfel baronfel added this to the Backlog milestone Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants