github.com/saintwish/kv@v1.0.4/README.md (about) 1 # kv 2 [![GoDoc](https://godoc.org/github.com/saintwish/kv?status.svg)](https://pkg.go.dev/github.com/saintwish/kv) 3 4 A collection of a few Go packages for Key Value storage like caches. 5 6 ``go get github.com/saintwish/kv`` 7 8 ## Packages 9 All of the packages of generic support for safety. Some of the packages use the [swiss map](https://github.com/dolthub/swiss) instead of the default Go map. 10 11 * `kv1` - A Key Value sharded cache with time expiration. Uses ``swiss`` map. 12 * `kv1s` - A Key Value sharded cache without any auto eviction. Uses ``swiss`` map. 13 * `kv2` - A Key Value sharded cache with a max size and automated eviction when the map gets full. **I wouldn't use it because that eviction method is flawed**. Uses ``swiss`` map. 14 * `kvswiss` - A Key Value cache that is non-sharded using the ``swiss`` map as it's backend. 15 16 * `kvmap` - A Key Value sharded cache using vanilla Go map with no auto eviction. 17 * `ccmap` - A concurrent safe default Go map without sharding. 18 * `stack` - A last in, first out stack implementation without concurrency support. Used in the ``kv2`` package. 19 20 ## Benchmarks 21 You can run benchmarks in the "main" using ``go test -bench . -benchmem``. There's some packages missing from the benchmarks however because _they should_ be the same as kv1 one basically except for different eviction methods. 22 23 ## Licensing 24 The [swiss map](https://github.com/dolthub/swiss) and this package are licensed with Apache-2.0