Description
Describe your feature request here
For my azure pipelines extension, I'd like to be able to cache a few files to speed up future executions.
Right now, that's only possible if the user adds a Cache@2
task to their pipeline where needed preceded by a script step to calculate cache keys and decide whether to run the step or not.
This logic is MUCH easier to do inside my own task, as I'd be able to handle everything from there.
My proposal is to add a tasklib function similar to the ones used by GitHub Action's setup-node step.
Ideally it would use the same efficient mechanism as the current Cache steps, but would allow me to have influence over whether to overwrite the cache at the end of the job or not.
I'd use this to also cache files that can't compute the cache key based on the contents of the repo. Instead, I'd use the return value of an API call or check whether the files to cache have changed since the last run.