mirror of
				https://github.com/Swatinem/rust-cache.git
				synced 2025-10-31 19:43:50 +00:00 
			
		
		
		
	Include CPU arch in the cache key (#228)
This commit is contained in:
		
							parent
							
								
									f0deed1e0e
								
							
						
					
					
						commit
						27b8ea9368
					
				
							
								
								
									
										5
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							| @ -86755,9 +86755,10 @@ class CacheConfig { | |||||||
|                 key += `-${job}`; |                 key += `-${job}`; | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         // Add runner OS to the key to avoid cross-contamination of cache
 |         // Add runner OS and CPU architecture to the key to avoid cross-contamination of cache
 | ||||||
|         const runnerOS = external_os_default().type(); |         const runnerOS = external_os_default().type(); | ||||||
|         key += `-${runnerOS}`; |         const runnerArch = external_os_default().arch(); | ||||||
|  |         key += `-${runnerOS}-${runnerArch}`; | ||||||
|         self.keyPrefix = key; |         self.keyPrefix = key; | ||||||
|         // Construct environment portion of the key:
 |         // Construct environment portion of the key:
 | ||||||
|         // This consists of a hash that considers the rust version
 |         // This consists of a hash that considers the rust version
 | ||||||
|  | |||||||
							
								
								
									
										5
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							| @ -86755,9 +86755,10 @@ class CacheConfig { | |||||||
|                 key += `-${job}`; |                 key += `-${job}`; | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         // Add runner OS to the key to avoid cross-contamination of cache
 |         // Add runner OS and CPU architecture to the key to avoid cross-contamination of cache
 | ||||||
|         const runnerOS = external_os_default().type(); |         const runnerOS = external_os_default().type(); | ||||||
|         key += `-${runnerOS}`; |         const runnerArch = external_os_default().arch(); | ||||||
|  |         key += `-${runnerOS}-${runnerArch}`; | ||||||
|         self.keyPrefix = key; |         self.keyPrefix = key; | ||||||
|         // Construct environment portion of the key:
 |         // Construct environment portion of the key:
 | ||||||
|         // This consists of a hash that considers the rust version
 |         // This consists of a hash that considers the rust version
 | ||||||
|  | |||||||
| @ -74,9 +74,10 @@ export class CacheConfig { | |||||||
|       } |       } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     // Add runner OS to the key to avoid cross-contamination of cache
 |     // Add runner OS and CPU architecture to the key to avoid cross-contamination of cache
 | ||||||
|     const runnerOS = os.type(); |     const runnerOS = os.type(); | ||||||
|     key += `-${runnerOS}`; |     const runnerArch = os.arch(); | ||||||
|  |     key += `-${runnerOS}-${runnerArch}`; | ||||||
| 
 | 
 | ||||||
|     self.keyPrefix = key; |     self.keyPrefix = key; | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user