Skip to content

Commit

Permalink
Add documentation for cache usage (#266)
Browse files Browse the repository at this point in the history
This change adds simple documentation for the cache functionality added in #203
  • Loading branch information
LucianBuzzo authored May 5, 2021
1 parent 1ec0c36 commit a7e985d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,20 @@ Pulling artifacts involves specifying the content addressable artifact, along wi
oras pull localhost:5000/hello-artifact:v2 -a
```
### Using cache when pulling artifacts
In order to save unnecessary network bandwidth and disk I/O oras should provides a solution to pull the artifacts into a local content-address storage (CAS) if the content does not exist, and then copy the artifact to the desired storage.
The cache directory is specified by using the environment variable `ORAS_CACHE`. If not specified, cache is not used.
```sh
# Set cache root
export ORAS_CACHE=~/.oras/cache
# Pull artifacts as usual
oras pull localhost:5000/hello:latest
```
## ORAS Go Module
While the ORAS CLI provides a great way to get started, and test registry support for [OCI Artifacts][artifacts], the primary experience enables a native experience for your artifact of choice. Using the ORAS Go Module, you can develop your own push/pull experience: `myclient push artifacts.azurecr.io/myartifact:1.0 ./mything.thang`
Expand Down

0 comments on commit a7e985d

Please sign in to comment.