1
0
Fork 0
toolkit/packages/cache/src
Enes Cakir 932ba2e7b2 [cache] Use Azure SDK to restore cache always if explicitly set to true
With the new cache service v2, `restoreCacheV2` [^1] and `saveCacheV2`
[^2] now explicitly use the Azure SDK for blob operations.

The cacheHttpClient uses the Azure SDK to save the cache if the
`useAzureSdk` option is set to true. [^3]

However, it may not use the Azure SDK to download the cache even if the
`useAzureSdk` option is set to true. If the signed URL does not end with
"blob.core.windows.net," it will not use the Azure SDK to restore the
cache. [^4]

To ensure consistent behavior between saving and restoring the cache,
the Azure SDK should be used to restore the cache if the `useAzureSdk`
option is explicitly set to true.

This PR ensures that the Azure SDK is used to restore the cache whenever
the `useAzureSdk` option is set to true.

[^1]: 1f7c2c79e0/packages/cache/src/cache.ts (L224)
[^2]: 1f7c2c79e0/packages/cache/src/cache.ts (L472)
[^3]: 1f7c2c79e0/packages/cache/src/internal/cacheHttpClient.ts (L335-L343)
[^4]: 1f7c2c79e0/packages/cache/src/internal/cacheHttpClient.ts (L153)
2025-01-24 16:27:40 +03:00
..
generated Remove more unused cache APIs 2024-12-17 14:51:57 -05:00
internal [cache] Use Azure SDK to restore cache always if explicitly set to true 2025-01-24 16:27:40 +03:00
cache.ts Minor comment adjustments 2024-12-02 11:10:25 -08:00
options.ts Tune upload options 2024-12-02 07:32:33 -08:00