microsoft / rushstack

Monorepo for tools developed by the Rush Stack community
https://rushstack.io/
Other
5.95k stars 601 forks source link

[rush] CacheID API #3994

Open gigara opened 1 year ago

gigara commented 1 year ago

Is there any method to retrieve the cache ID of a project whose local cache has been enabled? I want to retrieve the cacheIDs before the build and copy the cache files from storage.

dmichon-msft commented 1 year ago

Currently we don't calculate the ID until we try to fetch the cache entry from the registered provider. I'm very open to moving this calculation earlier into the process and making it available during, say, the createOperations hook, though it does involve a bit of plumbing work.

octogonz commented 2 weeks ago

Some progress in https://github.com/microsoft/rushstack/pull/4476

dmichon-msft commented 2 weeks ago

We now calculate all the hashes in beforeExecuteOperations, so the plugin could be modified to pass all the cache ids to some other API.