https://github.com/drone/drone-cache-lib
library for building cache plugins
https://github.com/drone/drone-cache-lib
Last synced: 5 months ago
JSON representation
library for building cache plugins
- Host: GitHub
- URL: https://github.com/drone/drone-cache-lib
- Owner: drone
- License: apache-2.0
- Created: 2016-12-18T15:14:25.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-12-01T16:50:38.000Z (over 5 years ago)
- Last Synced: 2024-06-18T21:41:42.383Z (about 2 years ago)
- Language: Go
- Homepage:
- Size: 42 KB
- Stars: 8
- Watchers: 5
- Forks: 9
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# drone-cache-lib
[](http://beta.drone.io/drone/drone-cache-lib)
[](https://discourse.drone.io)
[](https://stackoverflow.com/questions/tagged/drone.io)
[](http://godoc.org/github.com/drone/drone-cache-lib)
[](https://goreportcard.com/report/github.com/drone/drone-cache-lib)
A Go client library for creating cache [plugins](http://plugins.drone.io).
## Usage
### Download the packe
```bash
go get -d github.com/drone/drone-cache-lib
```
### Import the package
```Go
import "github.com/drone/drone-cache-lib/cache"
```
### Create a `Cache` object
```Go
cache, err := cache.New(storage)
```
### To rebuild the cache
```Go
err := cache.Rebuild(src, dst)
```
### To restore the cache
```Go
err := cache.Restore(src)
```
### Supported archive formats
* .tar