remisb / go-cache

Primitive experiments on data caching in go lang.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

go-cache

Primitive experiments on data caching in go lang.

This project is a research project, which should lead to basic caching understanding in golang and is an research project. So I expect to :

  • list all libraries I will find in the process.
  • evaluate those libraries
  • write notes about reviewed libraries
  • pros and cons of each library
  • performance notes

Golang Caching libraries:

  • gcache - github.com/bluele/gcache . Cache library for golang. It supports expirable Cache, LFU, LRU and ARC.
    • Notes:
      • Groupcache doesn't support updating an item or deleting it.
  • groupcache - github.com/golang/groupcache . groupcache is a caching and cache-filling library, intended as a replacement for memcached in many cases.
  • bigcache - github.com/allegro/bigcache . Efficient cache for gigabytes of data written in Go.
    • Fast, concurrent, evicting in-memory cache written to keep big number of entries without impact on performance. BigCache keeps entries on heap but omits GC for them. To achieve that operations on bytes arrays take place, therefore entries (de)serialization in front of the cache will be needed in most use cases.
  • freecache - github.com/coocood/freecache . A cache library for Go with zero GC overhead.
    • Long lived objects in memory introduce expensive GC overhead, With FreeCache, you can cache unlimited number of objects in memory without increased latency and degraded throughput.
  • go-cache - github.com/patrickmn/go-cache . An in-memory key:value store/cache (similar to Memcached) library for Go, suitable for single-machine applications.
  • golang-lru - github.com/hashicorp/golang-lru . Golang LRU cache. This provides the lru package which implements a fixed-size thread safe LRU cache. It is based on the cache in Groupcache.
  • rend - github.com/Netflix/rend . A memcached proxy that manages data chunking and L1 / L2 caches.
  • Mango cache - github.com/goburrow/cache . Mango Cache - Partial implementations of Guava Cache in Go.
  • ttlcache - github.com/ReneKroon/ttlcache . An in-memory string-interface{} map with various expiration options for golang.
    • TTLCache is a simple key/value cache in golang with the following functions:
      • Thread-safe
      • Individual expiring time or global expiring time, you can choose
      • Auto-Extending expiration on Get -or- DNS style TTL, see SkipTtlExtensionOnHit(bool)
      • Fast and memory efficient
      • Can trigger callback on key expiration

About

Primitive experiments on data caching in go lang.

License:MIT License


Languages

Language:Go 100.0%