In-memory caching solutions

This page summarizes the projects mentioned and recommended in the original post on /r/golang

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • encoding

    Go package containing implementations of efficient encoding, decoding, and validation APIs.

  • If you're interested in super fast & easy JSON for that cache give this a try I've used it in prod & never had a problem.

  • groupcache

    Clone of golang/groupcache with TTL and Item Removal support (by mailgun)

  • I use a fork of Google's groupcache by mailgun in production mostly to cache api requests in memory as protocol buffers. Google's implmentation is strictly a victim cache whereas the fork allows you to expire or delete keys from the cache which is important for me sepcifc usecase but it works quite well https://github.com/mailgun/groupcache

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • buntdb

    BuntDB is an embeddable, in-memory key/value database for Go with custom indexing and geospatial support

  • I've used BuntDB and had a great experience with it. It's basically just a JSON-based key-value store. I'm a huge fan of the developers other work (sjson, gjson, jj, etc) and stumbled on it while looking for a simple, embedded DB solution. It's not specifically a cache, though--just a simple DB, so you'd have to write the caching logic yourself.

  • go-cache

    An in-memory key:value store/cache (similar to Memcached) library for Go, suitable for single-machine applications.

  • Though pretty simple but have a look at https://github.com/patrickmn/go-cache

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts