mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-04-17 18:28:04 +08:00
Minor refactoring
This commit is contained in:
27
packages/cache/src/cache.ts
vendored
27
packages/cache/src/cache.ts
vendored
@@ -106,12 +106,12 @@ export async function restoreCache(
|
||||
/**
|
||||
* Restores cache using the legacy Cache Service
|
||||
*
|
||||
* @param paths
|
||||
* @param primaryKey
|
||||
* @param restoreKeys
|
||||
* @param options
|
||||
* @param enableCrossOsArchive
|
||||
* @returns
|
||||
* @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 options cache download options
|
||||
* @param enableCrossOsArchive 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
|
||||
*/
|
||||
async function restoreCacheV1(
|
||||
paths: string[],
|
||||
@@ -202,7 +202,7 @@ async function restoreCacheV1(
|
||||
}
|
||||
|
||||
/**
|
||||
* Restores cache using the new Cache Service
|
||||
* Restores cache using Cache Service v2
|
||||
*
|
||||
* @param paths a list of file paths to restore from the cache
|
||||
* @param primaryKey an explicit key for restoring the cache
|
||||
@@ -448,12 +448,12 @@ async function saveCacheV1(
|
||||
}
|
||||
|
||||
/**
|
||||
* Save cache using the new Cache Service
|
||||
* Save cache using Cache Service v2
|
||||
*
|
||||
* @param paths
|
||||
* @param key
|
||||
* @param options
|
||||
* @param enableCrossOsArchive
|
||||
* @param paths a list of file paths to restore from the cache
|
||||
* @param key an explicit key for restoring the cache
|
||||
* @param options cache upload options
|
||||
* @param enableCrossOsArchive an optional boolean enabled to save cache on windows which could be restored on any platform
|
||||
* @returns
|
||||
*/
|
||||
async function saveCacheV2(
|
||||
@@ -509,8 +509,7 @@ async function saveCacheV2(
|
||||
)
|
||||
}
|
||||
|
||||
// Set the archive size in the options, will be used to display the upload
|
||||
// progress
|
||||
// Set the archive size in the options, will be used to display the upload progress
|
||||
options.archiveSizeBytes = archiveFileSize
|
||||
|
||||
core.debug('Reserving Cache')
|
||||
|
||||
Reference in New Issue
Block a user