mirror of
				https://github.com/actions/cache.git
				synced 2025-10-31 16:54:01 +00:00 
			
		
		
		
	Use @cirunlabs/cache, update dist
				
					
				
			This commit is contained in:
		
							parent
							
								
									640a1c2554
								
							
						
					
					
						commit
						c32473836f
					
				
							
								
								
									
										12
									
								
								dist/restore-only/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								dist/restore-only/index.js
									
									
									
									
										vendored
									
									
								
							| @ -198,7 +198,7 @@ function restoreCacheV1(paths, primaryKey, restoreKeys, options, enableCrossOsAr | ||||
| function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { | ||||
|     return __awaiter(this, void 0, void 0, function* () { | ||||
|         // Override UploadOptions to force the use of Azure
 | ||||
|         options = Object.assign(Object.assign({}, options), { useAzureSdk: true }); | ||||
|         options = Object.assign(Object.assign({}, options), { useAzureSdk: false }); | ||||
|         restoreKeys = restoreKeys || []; | ||||
|         const keys = [primaryKey, ...restoreKeys]; | ||||
|         core.debug('Resolved Keys:'); | ||||
| @ -223,7 +223,13 @@ function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsAr | ||||
|                 core.debug(`Cache not found for version ${request.version} of keys: ${keys.join(', ')}`); | ||||
|                 return undefined; | ||||
|             } | ||||
|             core.info(`Cache hit for: ${request.key}`); | ||||
|             const isRestoreKeyMatch = request.key !== response.matchedKey; | ||||
|             if (isRestoreKeyMatch) { | ||||
|                 core.info(`Cache hit for restore-key: ${response.matchedKey}`); | ||||
|             } | ||||
|             else { | ||||
|                 core.info(`Cache hit for: ${response.matchedKey}`); | ||||
|             } | ||||
|             if (options === null || options === void 0 ? void 0 : options.lookupOnly) { | ||||
|                 core.info('Lookup only - skipping download'); | ||||
|                 return response.matchedKey; | ||||
| @ -380,7 +386,7 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) { | ||||
|         // Override UploadOptions to force the use of Azure
 | ||||
|         // ...options goes first because we want to override the default values
 | ||||
|         // set in UploadOptions with these specific figures
 | ||||
|         options = Object.assign(Object.assign({}, options), { uploadChunkSize: 64 * 1024 * 1024, uploadConcurrency: 8, useAzureSdk: true }); | ||||
|         options = Object.assign(Object.assign({}, options), { uploadChunkSize: 64 * 1024 * 1024, uploadConcurrency: 8, useAzureSdk: false }); | ||||
|         const compressionMethod = yield utils.getCompressionMethod(); | ||||
|         const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); | ||||
|         let cacheId = -1; | ||||
|  | ||||
							
								
								
									
										12
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							| @ -198,7 +198,7 @@ function restoreCacheV1(paths, primaryKey, restoreKeys, options, enableCrossOsAr | ||||
| function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { | ||||
|     return __awaiter(this, void 0, void 0, function* () { | ||||
|         // Override UploadOptions to force the use of Azure
 | ||||
|         options = Object.assign(Object.assign({}, options), { useAzureSdk: true }); | ||||
|         options = Object.assign(Object.assign({}, options), { useAzureSdk: false }); | ||||
|         restoreKeys = restoreKeys || []; | ||||
|         const keys = [primaryKey, ...restoreKeys]; | ||||
|         core.debug('Resolved Keys:'); | ||||
| @ -223,7 +223,13 @@ function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsAr | ||||
|                 core.debug(`Cache not found for version ${request.version} of keys: ${keys.join(', ')}`); | ||||
|                 return undefined; | ||||
|             } | ||||
|             core.info(`Cache hit for: ${request.key}`); | ||||
|             const isRestoreKeyMatch = request.key !== response.matchedKey; | ||||
|             if (isRestoreKeyMatch) { | ||||
|                 core.info(`Cache hit for restore-key: ${response.matchedKey}`); | ||||
|             } | ||||
|             else { | ||||
|                 core.info(`Cache hit for: ${response.matchedKey}`); | ||||
|             } | ||||
|             if (options === null || options === void 0 ? void 0 : options.lookupOnly) { | ||||
|                 core.info('Lookup only - skipping download'); | ||||
|                 return response.matchedKey; | ||||
| @ -380,7 +386,7 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) { | ||||
|         // Override UploadOptions to force the use of Azure
 | ||||
|         // ...options goes first because we want to override the default values
 | ||||
|         // set in UploadOptions with these specific figures
 | ||||
|         options = Object.assign(Object.assign({}, options), { uploadChunkSize: 64 * 1024 * 1024, uploadConcurrency: 8, useAzureSdk: true }); | ||||
|         options = Object.assign(Object.assign({}, options), { uploadChunkSize: 64 * 1024 * 1024, uploadConcurrency: 8, useAzureSdk: false }); | ||||
|         const compressionMethod = yield utils.getCompressionMethod(); | ||||
|         const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); | ||||
|         let cacheId = -1; | ||||
|  | ||||
							
								
								
									
										12
									
								
								dist/save-only/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								dist/save-only/index.js
									
									
									
									
										vendored
									
									
								
							| @ -198,7 +198,7 @@ function restoreCacheV1(paths, primaryKey, restoreKeys, options, enableCrossOsAr | ||||
| function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { | ||||
|     return __awaiter(this, void 0, void 0, function* () { | ||||
|         // Override UploadOptions to force the use of Azure
 | ||||
|         options = Object.assign(Object.assign({}, options), { useAzureSdk: true }); | ||||
|         options = Object.assign(Object.assign({}, options), { useAzureSdk: false }); | ||||
|         restoreKeys = restoreKeys || []; | ||||
|         const keys = [primaryKey, ...restoreKeys]; | ||||
|         core.debug('Resolved Keys:'); | ||||
| @ -223,7 +223,13 @@ function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsAr | ||||
|                 core.debug(`Cache not found for version ${request.version} of keys: ${keys.join(', ')}`); | ||||
|                 return undefined; | ||||
|             } | ||||
|             core.info(`Cache hit for: ${request.key}`); | ||||
|             const isRestoreKeyMatch = request.key !== response.matchedKey; | ||||
|             if (isRestoreKeyMatch) { | ||||
|                 core.info(`Cache hit for restore-key: ${response.matchedKey}`); | ||||
|             } | ||||
|             else { | ||||
|                 core.info(`Cache hit for: ${response.matchedKey}`); | ||||
|             } | ||||
|             if (options === null || options === void 0 ? void 0 : options.lookupOnly) { | ||||
|                 core.info('Lookup only - skipping download'); | ||||
|                 return response.matchedKey; | ||||
| @ -380,7 +386,7 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) { | ||||
|         // Override UploadOptions to force the use of Azure
 | ||||
|         // ...options goes first because we want to override the default values
 | ||||
|         // set in UploadOptions with these specific figures
 | ||||
|         options = Object.assign(Object.assign({}, options), { uploadChunkSize: 64 * 1024 * 1024, uploadConcurrency: 8, useAzureSdk: true }); | ||||
|         options = Object.assign(Object.assign({}, options), { uploadChunkSize: 64 * 1024 * 1024, uploadConcurrency: 8, useAzureSdk: false }); | ||||
|         const compressionMethod = yield utils.getCompressionMethod(); | ||||
|         const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); | ||||
|         let cacheId = -1; | ||||
|  | ||||
							
								
								
									
										12
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							| @ -198,7 +198,7 @@ function restoreCacheV1(paths, primaryKey, restoreKeys, options, enableCrossOsAr | ||||
| function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { | ||||
|     return __awaiter(this, void 0, void 0, function* () { | ||||
|         // Override UploadOptions to force the use of Azure
 | ||||
|         options = Object.assign(Object.assign({}, options), { useAzureSdk: true }); | ||||
|         options = Object.assign(Object.assign({}, options), { useAzureSdk: false }); | ||||
|         restoreKeys = restoreKeys || []; | ||||
|         const keys = [primaryKey, ...restoreKeys]; | ||||
|         core.debug('Resolved Keys:'); | ||||
| @ -223,7 +223,13 @@ function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsAr | ||||
|                 core.debug(`Cache not found for version ${request.version} of keys: ${keys.join(', ')}`); | ||||
|                 return undefined; | ||||
|             } | ||||
|             core.info(`Cache hit for: ${request.key}`); | ||||
|             const isRestoreKeyMatch = request.key !== response.matchedKey; | ||||
|             if (isRestoreKeyMatch) { | ||||
|                 core.info(`Cache hit for restore-key: ${response.matchedKey}`); | ||||
|             } | ||||
|             else { | ||||
|                 core.info(`Cache hit for: ${response.matchedKey}`); | ||||
|             } | ||||
|             if (options === null || options === void 0 ? void 0 : options.lookupOnly) { | ||||
|                 core.info('Lookup only - skipping download'); | ||||
|                 return response.matchedKey; | ||||
| @ -380,7 +386,7 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) { | ||||
|         // Override UploadOptions to force the use of Azure
 | ||||
|         // ...options goes first because we want to override the default values
 | ||||
|         // set in UploadOptions with these specific figures
 | ||||
|         options = Object.assign(Object.assign({}, options), { uploadChunkSize: 64 * 1024 * 1024, uploadConcurrency: 8, useAzureSdk: true }); | ||||
|         options = Object.assign(Object.assign({}, options), { uploadChunkSize: 64 * 1024 * 1024, uploadConcurrency: 8, useAzureSdk: false }); | ||||
|         const compressionMethod = yield utils.getCompressionMethod(); | ||||
|         const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); | ||||
|         let cacheId = -1; | ||||
|  | ||||
| @ -23,7 +23,7 @@ | ||||
|   "author": "GitHub", | ||||
|   "license": "MIT", | ||||
|   "dependencies": { | ||||
|     "@actions/cache": "^4.0.3", | ||||
|     "@cirunlabs/cache": "^4.0.3", | ||||
|     "@actions/core": "^1.11.1", | ||||
|     "@actions/exec": "^1.1.1", | ||||
|     "@actions/io": "^1.1.3" | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user