remove "restoreKeys" to clear cache after update
This commit is contained in:
		
							parent
							
								
									a12e082d83
								
							
						
					
					
						commit
						efcb607a6b
					
				
							
								
								
									
										5
									
								
								dist/cleanup/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								dist/cleanup/index.js
									
									
									
									
										vendored
									
									
								
							| @ -61868,9 +61868,8 @@ function restore(id) { | |||||||
|         if (primaryKey.endsWith('-')) { |         if (primaryKey.endsWith('-')) { | ||||||
|             throw new Error(`No file in ${process.cwd()} matched to [${packageManager.pattern}], make sure you have checked out the target repository`); |             throw new Error(`No file in ${process.cwd()} matched to [${packageManager.pattern}], make sure you have checked out the target repository`); | ||||||
|         } |         } | ||||||
|         const matchedKey = yield cache.restoreCache(packageManager.path, primaryKey, [ |         // No "restoreKeys" is set, to start with a clear cache after dependency update (see https://github.com/actions/setup-java/issues/269)
 | ||||||
|             `${CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${id}` |         const matchedKey = yield cache.restoreCache(packageManager.path, primaryKey); | ||||||
|         ]); |  | ||||||
|         if (matchedKey) { |         if (matchedKey) { | ||||||
|             core.saveState(CACHE_MATCHED_KEY, matchedKey); |             core.saveState(CACHE_MATCHED_KEY, matchedKey); | ||||||
|             core.info(`Cache restored from key: ${matchedKey}`); |             core.info(`Cache restored from key: ${matchedKey}`); | ||||||
|  | |||||||
							
								
								
									
										5
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							| @ -18659,9 +18659,8 @@ function restore(id) { | |||||||
|         if (primaryKey.endsWith('-')) { |         if (primaryKey.endsWith('-')) { | ||||||
|             throw new Error(`No file in ${process.cwd()} matched to [${packageManager.pattern}], make sure you have checked out the target repository`); |             throw new Error(`No file in ${process.cwd()} matched to [${packageManager.pattern}], make sure you have checked out the target repository`); | ||||||
|         } |         } | ||||||
|         const matchedKey = yield cache.restoreCache(packageManager.path, primaryKey, [ |         // No "restoreKeys" is set, to start with a clear cache after dependency update (see https://github.com/actions/setup-java/issues/269)
 | ||||||
|             `${CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${id}` |         const matchedKey = yield cache.restoreCache(packageManager.path, primaryKey); | ||||||
|         ]); |  | ||||||
|         if (matchedKey) { |         if (matchedKey) { | ||||||
|             core.saveState(CACHE_MATCHED_KEY, matchedKey); |             core.saveState(CACHE_MATCHED_KEY, matchedKey); | ||||||
|             core.info(`Cache restored from key: ${matchedKey}`); |             core.info(`Cache restored from key: ${matchedKey}`); | ||||||
|  | |||||||
| @ -72,9 +72,8 @@ export async function restore(id: string) { | |||||||
|     ); |     ); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   const matchedKey = await cache.restoreCache(packageManager.path, primaryKey, [ |   // No "restoreKeys" is set, to start with a clear cache after dependency update (see https://github.com/actions/setup-java/issues/269)
 | ||||||
|     `${CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${id}` |   const matchedKey = await cache.restoreCache(packageManager.path, primaryKey); | ||||||
|   ]); |  | ||||||
|   if (matchedKey) { |   if (matchedKey) { | ||||||
|     core.saveState(CACHE_MATCHED_KEY, matchedKey); |     core.saveState(CACHE_MATCHED_KEY, matchedKey); | ||||||
|     core.info(`Cache restored from key: ${matchedKey}`); |     core.info(`Cache restored from key: ${matchedKey}`); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user