项目作者: workshop-depot

项目描述 :
tiny in-memory single-app kv (cache) with explicit and sliding expiration
高级语言: Go
项目地址: git://github.com/workshop-depot/tinykv.git
创建时间: 2017-09-14T11:03:54Z
项目社区:https://github.com/workshop-depot/tinykv

开源协议:MIT License

下载


GoDoc Go Report Card

tinykv

tiny in-memory single-app kv (cache) with explicit and sliding expiration

v4

  • Heap-based expiration strategy

Get it using:

  1. $ go get gopkg.in/dc0d/tinykv.v4

v3

  • Using only string keys,
  • Simplifying the interface,

Get it using:

  1. $ go get gopkg.in/dc0d/tinykv.v3

v2

Get it using:

  1. $ go get gopkg.in/dc0d/tinykv.v2

v1

Get it using:

  1. $ go get gopkg.in/dc0d/tinykv.v1

Benchmarks:

  1. $ go test -bench=.
  2. BenchmarkGetNoValue-8 20000000 72.6 ns/op
  3. BenchmarkGetValue-8 20000000 78.3 ns/op
  4. BenchmarkGetSlidingTimeout-8 10000000 128 ns/op
  5. BenchmarkPutOne-8 10000000 219 ns/op
  6. BenchmarkPutN-8 2000000 814 ns/op
  7. BenchmarkPutExpire-8 2000000 882 ns/op
  8. BenchmarkCASTrue-8 5000000 268 ns/op
  9. BenchmarkCASFalse-8 10000000 260 ns/op