Skip to content
This repository has been archived by the owner on May 10, 2020. It is now read-only.
/ tinykv Public archive

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

License

Notifications You must be signed in to change notification settings

workshop-depot/tinykv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

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

v3

  • Using only string keys,
  • Simplifying the interface,

Get it using:

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

v2

Get it using:

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

v1

Get it using:

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

Benchmarks:

$ go test -bench=.
BenchmarkGetNoValue-8          	20000000	        72.6 ns/op
BenchmarkGetValue-8            	20000000	        78.3 ns/op
BenchmarkGetSlidingTimeout-8   	10000000	       128 ns/op
BenchmarkPutOne-8              	10000000	       219 ns/op
BenchmarkPutN-8                	 2000000	       814 ns/op
BenchmarkPutExpire-8           	 2000000	       882 ns/op
BenchmarkCASTrue-8             	 5000000	       268 ns/op
BenchmarkCASFalse-8            	10000000	       260 ns/op

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages