mirror of
				https://github.com/actions/cache.git
				synced 2025-10-31 20:08:36 +08:00 
			
		
		
		
	Add cargo example
This commit is contained in:
		
							parent
							
								
									aae1376422
								
							
						
					
					
						commit
						9dd57f4d18
					
				
							
								
								
									
										20
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								README.md
									
									
									
									
									
								
							|  | @ -57,6 +57,26 @@ jobs: | |||
| 
 | ||||
| See [Examples](examples.md) | ||||
| 
 | ||||
| ### Rust - Cargo | ||||
| 
 | ||||
| ``` | ||||
| - name: Cache cargo registry | ||||
|   uses: actions/cache@preview | ||||
|   with: | ||||
|     path: ~/.cargo/registry | ||||
|     key: ${{ runner.os }}-cargo-registry | ||||
| - name: Cache cargo index | ||||
|   uses: actions/cache@preview | ||||
|   with: | ||||
|     path: ~/.cargo/git | ||||
|     key: ${{ runner.os }}-cargo-index | ||||
| - name: Cache cargo build | ||||
|   uses: actions/cache@preview | ||||
|   with: | ||||
|     path: target | ||||
|     key: ${{ runner.os }}-cargo-build-target | ||||
| ``` | ||||
| 
 | ||||
| ## Cache Limits | ||||
| 
 | ||||
| Individual caches are limited to 200MB and a repository can have up to 2GB of caches. Once the 2GB limit is reached, older caches will be evicted based on when the cache was last accessed. | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 rhysd
						rhysd