mirror of
				https://github.com/actions/cache.git
				synced 2025-10-31 10:24:19 +08:00 
			
		
		
		
	Implement cache v2
This commit is contained in:
		
							parent
							
								
									f7e6edf3a0
								
							
						
					
					
						commit
						643d6d6123
					
				
							
								
								
									
										5
									
								
								dist/restore-only/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								dist/restore-only/index.js
									
									
									
									
										vendored
									
									
								
							| @ -12362,17 +12362,18 @@ const core = __importStar(__nccwpck_require__(4850)); | |||||||
| const storage_blob_1 = __nccwpck_require__(3864); | const storage_blob_1 = __nccwpck_require__(3864); | ||||||
| function UploadCache(uploadURL, archivePath) { | function UploadCache(uploadURL, archivePath) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         core.debug(`Uploading cache to: ${uploadURL}`); |         core.info(`Uploading ${archivePath} to: ${uploadURL}`); | ||||||
|         // Specify data transfer options
 |         // Specify data transfer options
 | ||||||
|         const uploadOptions = { |         const uploadOptions = { | ||||||
|             blockSize: 4 * 1024 * 1024, |             blockSize: 4 * 1024 * 1024, | ||||||
|             concurrency: 2, |             concurrency: 2, | ||||||
|             maxSingleShotSize: 8 * 1024 * 1024, // 8 MiB initial transfer size
 |             maxSingleShotSize: 8 * 1024 * 1024, // 8 MiB initial transfer size
 | ||||||
|         }; |         }; | ||||||
|         // Create blob client from container client
 |  | ||||||
|         // const blobClient: BlobClient = new BlobClient(uploadURL.urls[0])
 |         // const blobClient: BlobClient = new BlobClient(uploadURL.urls[0])
 | ||||||
|         const blobClient = new storage_blob_1.BlobClient(uploadURL.urls[0].url); |         const blobClient = new storage_blob_1.BlobClient(uploadURL.urls[0].url); | ||||||
|         const blockBlobClient = blobClient.getBlockBlobClient(); |         const blockBlobClient = blobClient.getBlockBlobClient(); | ||||||
|  |         core.info(`BlobClient: ${blobClient}`); | ||||||
|  |         core.info(`BlobClient: ${blockBlobClient}`); | ||||||
|         return blockBlobClient.uploadFile(archivePath, uploadOptions); |         return blockBlobClient.uploadFile(archivePath, uploadOptions); | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
|  | |||||||
							
								
								
									
										5
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							| @ -12362,17 +12362,18 @@ const core = __importStar(__nccwpck_require__(4850)); | |||||||
| const storage_blob_1 = __nccwpck_require__(3864); | const storage_blob_1 = __nccwpck_require__(3864); | ||||||
| function UploadCache(uploadURL, archivePath) { | function UploadCache(uploadURL, archivePath) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         core.debug(`Uploading cache to: ${uploadURL}`); |         core.info(`Uploading ${archivePath} to: ${uploadURL}`); | ||||||
|         // Specify data transfer options
 |         // Specify data transfer options
 | ||||||
|         const uploadOptions = { |         const uploadOptions = { | ||||||
|             blockSize: 4 * 1024 * 1024, |             blockSize: 4 * 1024 * 1024, | ||||||
|             concurrency: 2, |             concurrency: 2, | ||||||
|             maxSingleShotSize: 8 * 1024 * 1024, // 8 MiB initial transfer size
 |             maxSingleShotSize: 8 * 1024 * 1024, // 8 MiB initial transfer size
 | ||||||
|         }; |         }; | ||||||
|         // Create blob client from container client
 |  | ||||||
|         // const blobClient: BlobClient = new BlobClient(uploadURL.urls[0])
 |         // const blobClient: BlobClient = new BlobClient(uploadURL.urls[0])
 | ||||||
|         const blobClient = new storage_blob_1.BlobClient(uploadURL.urls[0].url); |         const blobClient = new storage_blob_1.BlobClient(uploadURL.urls[0].url); | ||||||
|         const blockBlobClient = blobClient.getBlockBlobClient(); |         const blockBlobClient = blobClient.getBlockBlobClient(); | ||||||
|  |         core.info(`BlobClient: ${blobClient}`); | ||||||
|  |         core.info(`BlobClient: ${blockBlobClient}`); | ||||||
|         return blockBlobClient.uploadFile(archivePath, uploadOptions); |         return blockBlobClient.uploadFile(archivePath, uploadOptions); | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
|  | |||||||
							
								
								
									
										5
									
								
								dist/save-only/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								dist/save-only/index.js
									
									
									
									
										vendored
									
									
								
							| @ -12362,17 +12362,18 @@ const core = __importStar(__nccwpck_require__(4850)); | |||||||
| const storage_blob_1 = __nccwpck_require__(3864); | const storage_blob_1 = __nccwpck_require__(3864); | ||||||
| function UploadCache(uploadURL, archivePath) { | function UploadCache(uploadURL, archivePath) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         core.debug(`Uploading cache to: ${uploadURL}`); |         core.info(`Uploading ${archivePath} to: ${uploadURL}`); | ||||||
|         // Specify data transfer options
 |         // Specify data transfer options
 | ||||||
|         const uploadOptions = { |         const uploadOptions = { | ||||||
|             blockSize: 4 * 1024 * 1024, |             blockSize: 4 * 1024 * 1024, | ||||||
|             concurrency: 2, |             concurrency: 2, | ||||||
|             maxSingleShotSize: 8 * 1024 * 1024, // 8 MiB initial transfer size
 |             maxSingleShotSize: 8 * 1024 * 1024, // 8 MiB initial transfer size
 | ||||||
|         }; |         }; | ||||||
|         // Create blob client from container client
 |  | ||||||
|         // const blobClient: BlobClient = new BlobClient(uploadURL.urls[0])
 |         // const blobClient: BlobClient = new BlobClient(uploadURL.urls[0])
 | ||||||
|         const blobClient = new storage_blob_1.BlobClient(uploadURL.urls[0].url); |         const blobClient = new storage_blob_1.BlobClient(uploadURL.urls[0].url); | ||||||
|         const blockBlobClient = blobClient.getBlockBlobClient(); |         const blockBlobClient = blobClient.getBlockBlobClient(); | ||||||
|  |         core.info(`BlobClient: ${blobClient}`); | ||||||
|  |         core.info(`BlobClient: ${blockBlobClient}`); | ||||||
|         return blockBlobClient.uploadFile(archivePath, uploadOptions); |         return blockBlobClient.uploadFile(archivePath, uploadOptions); | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
|  | |||||||
							
								
								
									
										5
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							| @ -12362,17 +12362,18 @@ const core = __importStar(__nccwpck_require__(4850)); | |||||||
| const storage_blob_1 = __nccwpck_require__(3864); | const storage_blob_1 = __nccwpck_require__(3864); | ||||||
| function UploadCache(uploadURL, archivePath) { | function UploadCache(uploadURL, archivePath) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         core.debug(`Uploading cache to: ${uploadURL}`); |         core.info(`Uploading ${archivePath} to: ${uploadURL}`); | ||||||
|         // Specify data transfer options
 |         // Specify data transfer options
 | ||||||
|         const uploadOptions = { |         const uploadOptions = { | ||||||
|             blockSize: 4 * 1024 * 1024, |             blockSize: 4 * 1024 * 1024, | ||||||
|             concurrency: 2, |             concurrency: 2, | ||||||
|             maxSingleShotSize: 8 * 1024 * 1024, // 8 MiB initial transfer size
 |             maxSingleShotSize: 8 * 1024 * 1024, // 8 MiB initial transfer size
 | ||||||
|         }; |         }; | ||||||
|         // Create blob client from container client
 |  | ||||||
|         // const blobClient: BlobClient = new BlobClient(uploadURL.urls[0])
 |         // const blobClient: BlobClient = new BlobClient(uploadURL.urls[0])
 | ||||||
|         const blobClient = new storage_blob_1.BlobClient(uploadURL.urls[0].url); |         const blobClient = new storage_blob_1.BlobClient(uploadURL.urls[0].url); | ||||||
|         const blockBlobClient = blobClient.getBlockBlobClient(); |         const blockBlobClient = blobClient.getBlockBlobClient(); | ||||||
|  |         core.info(`BlobClient: ${blobClient}`); | ||||||
|  |         core.info(`BlobClient: ${blockBlobClient}`); | ||||||
|         return blockBlobClient.uploadFile(archivePath, uploadOptions); |         return blockBlobClient.uploadFile(archivePath, uploadOptions); | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Bassem Dghaidi
						Bassem Dghaidi