This commit is contained in:
Sampark Sharma
2022-12-29 11:55:10 +00:00
committed by GitHub
parent ec3a87298b
commit da162e46a8
5 changed files with 38 additions and 17 deletions

View File

@@ -61,16 +61,16 @@ export function isFeatureAvailable(): boolean {
* @param paths a list of file paths to restore from the cache
* @param primaryKey an explicit key for restoring the cache
* @param restoreKeys an optional ordered list of keys to use for restoring the cache if no cache hit occurred for key
* @param crossOsEnabled an optional boolean enabled to restore on windows any cache created on any platform
* @param downloadOptions cache download options
* @param crossOsEnabled an optional boolean enabled to restore on windows any cache created on any platform
* @returns string returns the key for the cache hit, otherwise returns undefined
*/
export async function restoreCache(
paths: string[],
primaryKey: string,
restoreKeys?: string[],
crossOsEnabled = false,
options?: DownloadOptions
options?: DownloadOptions,
crossOsEnabled = false
): Promise<string | undefined> {
checkPaths(paths)
@@ -181,8 +181,8 @@ export async function restoreCache(
export async function saveCache(
paths: string[],
key: string,
crossOsEnabled = false,
options?: UploadOptions
options?: UploadOptions,
crossOsEnabled = false
): Promise<number> {
checkPaths(paths)
checkKey(key)

View File

@@ -34,9 +34,9 @@ export interface ReserveCacheResponse {
}
export interface InternalCacheOptions {
cacheSize?: number
compressionMethod?: CompressionMethod
crossOsEnabled?: boolean
cacheSize?: number
}
export interface ArchiveTool {