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

[Question]: Cache@2 only downloads files not available in target path? #19261

Closed
3 of 4 tasks
MTomBosch opened this issue Nov 10, 2023 · 2 comments
Closed
3 of 4 tasks

Comments

@MTomBosch
Copy link

MTomBosch commented Nov 10, 2023

Task name

Cache

Task version

2

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

Ubuntu

Question

Assuming I have a folder /var/cache which already has some content. And now the cache task should restore the cached files into that folder. What happens if files from the cache are already existing (same size, hash, ..) in the folder? 

Are the files still downloaded from the cache and then the local files overwritten or is there some incremental behaviour in the cache task to only download what is not yet there in the target path?
@MTomBosch MTomBosch changed the title [Question]: Cache@2 [Question]: Cache@2 only downloads files not available in target path? Nov 10, 2023
@ReneSchumacher
Copy link
Member

Looking at the code of the task, the agent plugin, and Azure DevOps backend, the cache task always downloads and restores all cached files. This makes sense (imho), since checking each file individually might take even longer than just wiping out the target and restoring the cached files.

@MTomBosch
Copy link
Author

OK. Thank you

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

No branches or pull requests

2 participants