An open API service indexing awesome lists of open source software.

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

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.