Update README, ci, pa
Signed-off-by: Peng Gao <peng.gao.dut@gmail.com>
This commit is contained in:
parent
5b06290188
commit
3cceb4fab0
|
@ -0,0 +1,9 @@
|
||||||
|
approve_by_comment: true
|
||||||
|
approve_regex: ^LGTM
|
||||||
|
reject_regex: ^Rejected
|
||||||
|
reset_on_push: true
|
||||||
|
reviewers:
|
||||||
|
members:
|
||||||
|
- ggaaooppeenngg
|
||||||
|
name: pullapprove
|
||||||
|
required: 1
|
|
@ -0,0 +1,8 @@
|
||||||
|
language: go
|
||||||
|
|
||||||
|
go:
|
||||||
|
- tip
|
||||||
|
|
||||||
|
script:
|
||||||
|
- go test -v -coverprofile=coverage.txt -covermode=atomic
|
||||||
|
|
17
README.md
17
README.md
|
@ -1,6 +1,9 @@
|
||||||
# go-cache
|
[![Build Status](https://travis-ci.org/ggaaooppeenngg/cachemap.svg?branch=master)](https://travis-ci.org/ggaaooppeenngg/cachemap)
|
||||||
|
[![Go Report Card](https://goreportcard.com/badge/github.com/ggaaooppeenngg/cachemap)](https://goreportcard.com/report/github.com/ggaaooppeenngg/cachemap)
|
||||||
|
[![GoDoc](https://godoc.org/github.com/ggaaooppeenngg/cachemap?status.svg)](https://godoc.org/github.com/ggaaooppeenngg/cachemap)
|
||||||
|
# cachemap
|
||||||
|
|
||||||
go-cache is an in-memory key:value store/cache similar to memcached that is
|
cachemap is an in-memory key:value store/cache similar to memcached that is
|
||||||
suitable for applications running on a single machine. Its major advantage is
|
suitable for applications running on a single machine. Its major advantage is
|
||||||
that, being essentially a thread-safe `map[string]interface{}` with expiration
|
that, being essentially a thread-safe `map[string]interface{}` with expiration
|
||||||
times, it doesn't need to serialize or transmit its contents over the network.
|
times, it doesn't need to serialize or transmit its contents over the network.
|
||||||
|
@ -8,21 +11,21 @@ times, it doesn't need to serialize or transmit its contents over the network.
|
||||||
Any object can be stored, for a given duration or forever, and the cache can be
|
Any object can be stored, for a given duration or forever, and the cache can be
|
||||||
safely used by multiple goroutines.
|
safely used by multiple goroutines.
|
||||||
|
|
||||||
Although go-cache isn't meant to be used as a persistent datastore, the entire
|
Although cachemap isn't meant to be used as a persistent datastore, the entire
|
||||||
cache can be saved to and loaded from a file (using `c.Items()` to retrieve the
|
cache can be saved to and loaded from a file (using `c.Items()` to retrieve the
|
||||||
items map to serialize, and `NewFrom()` to create a cache from a deserialized
|
items map to serialize, and `NewFrom()` to create a cache from a deserialized
|
||||||
one) to recover from downtime quickly. (See the docs for `NewFrom()` for caveats.)
|
one) to recover from downtime quickly. (See the docs for `NewFrom()` for caveats.)
|
||||||
|
|
||||||
### Installation
|
### Installation
|
||||||
|
|
||||||
`go get github.com/patrickmn/go-cache`
|
`go get github.com/ggaaooppeenngg/cachemap`
|
||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
```go
|
```go
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/patrickmn/go-cache"
|
"github.com/patrickmn/cachemap"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -102,10 +105,6 @@ one) to recover from downtime quickly. (See the docs for `NewFrom()` for caveats
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Reference
|
|
||||||
|
|
||||||
`godoc` or [http://godoc.org/github.com/patrickmn/go-cache](http://godoc.org/github.com/patrickmn/go-cache)
|
|
||||||
|
|
||||||
### Benchmark
|
### Benchmark
|
||||||
|
|
||||||
| benchmark\package | go-cache | cachemap |
|
| benchmark\package | go-cache | cachemap |
|
||||||
|
|
Loading…
Reference in New Issue