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

Add agent files cache #688

Open
sebastienros opened this issue Jan 19, 2024 · 0 comments
Open

Add agent files cache #688

sebastienros opened this issue Jan 19, 2024 · 0 comments

Comments

@sebastienros
Copy link
Member

The build and output files that are sent to the agent could be cached on the server by sending a custom etag header in the request which would contain the CRC32 of the file being uploaded.

The JobsController.SaveBodyAsync method could check if the header is set. If it is then it would seek a file named with this CRC32 value, and copy it instead of streaming the content from the client. Then stopped prematurely the request with a success code that indicates the content was cached (304). The controller would then log this result to show that the content was already found on the server.

The agent needs to use a folder that is reused across agent instances. This could be in {_buildPath}/.filecache.
The agent can check the contents of this file on startup and remove older files when a customizable quotas is reached (argument). A good default could be 10GB (to allow files of 1GB so be kept locally).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant