https://github.com/magicoder10/xcache
Convenient Golang caching library
https://github.com/magicoder10/xcache
Last synced: 2 months ago
JSON representation
Convenient Golang caching library
- Host: GitHub
- URL: https://github.com/magicoder10/xcache
- Owner: magicoder10
- Created: 2019-03-04T05:14:19.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-04T19:47:17.000Z (over 6 years ago)
- Last Synced: 2025-03-26T03:02:17.754Z (3 months ago)
- Language: Go
- Homepage:
- Size: 11.7 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# xCache
Convenient Golang caching library
## Getting Started
### Installation
```
$ go get github.com/byliuyang/xcache
```### Usage
```go
import "github.com/byliuyang/xcache"// Initialize buffer with length of 3 and LRU replacement policy
cache := NewBuilder().
Capacity(3).
LRU().
Build()cache.Set(1, 4)
value, err := cache.Get(1)
```## Author
- **Harry Liu** - *Initial work* - [byliuyang](https://github.com/byliuyang)## License
This library is maintained under the MIT License.