awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
pmylund avatar

pmylund/go-cache

0
View on GitHub↗
8,828 stars·904 forks·Go·MIT·17 viewspatrickmn.com/projects/go-cache↗

Go Cache

go-cache is a thread-safe, in-memory key-value store for single-machine applications. It provides a local caching mechanism that stores objects in RAM to reduce redundant data retrieval and avoid the overhead of network protocols or serialization.

The system features a persistent cache store that saves the in-memory state to a local file, allowing data recovery across application restarts.

The project manages concurrent data access across multiple routines and implements time-to-live expiration for cached entries. A background process periodically scans the store to delete expired items and free memory.

Features

  • In-Memory State Maps - Provides a thread-safe in-memory key-value map for fast object storage and retrieval.
  • Go In-Memory Caches - A high-performance, thread-safe in-memory key-value cache implemented specifically for Go.
  • In-Memory Caches - Caches frequently accessed data in RAM to reduce latency and avoid expensive data retrieval.
  • Key-Value Stores - Implements a lightweight local key-value store for single-machine applications.
  • Time-Based Expirations - Implements time-to-live expiration to automatically invalidate cached entries after a set duration.
  • Mutexes and Locks - Employs mutual exclusion locks to ensure thread-safe access to the underlying key-value map.
  • Concurrent Data Structures - Provides a thread-safe map implementation that manages shared data across multiple Go routines.
  • Cache State Persistences - Saves the complete in-memory cache state to disk to allow restoration after application restarts.
  • Persistent Application State - Preserves application cache data across sessions by saving the state to a local file.
  • Cache State Serializations - Serializes the in-memory cache state to a local file using gob encoding for recovery.
  • Databases - In-memory key-value store for single-machine applications.
  • Embedded Databases - In-memory key-value store and cache for Go.

Star history

Star history chart for pmylund/go-cacheStar history chart for pmylund/go-cache

How this analysis was created: This summary and feature list are AI-generated from collected project material and can contain mistakes. Stars, license and language are imported from GitHub. Inclusion does not mean that we have tested or audited this project. Check the source documentation for any feature you depend on. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Projects sharing features with Go Cache

These projects share indexed features with Go Cache. Shared tags can include platform or build tooling; verify the primary use case before treating a result as a replacement.
  • patrickmn/go-cachepatrickmn avatar

    patrickmn/go-cache

    8,828View on GitHub↗

    go-cache is a thread-safe, in-memory cache library for Go that stores arbitrary objects with per-item expiration timestamps. It provides a concurrent key-value store where multiple goroutines can safely read and write shared cached data without external synchronization, using a mutex-guarded map for access control. The library distinguishes itself through its expiration management and optional disk persistence. Each cached item carries its own time-to-live, and a background goroutine periodically purges expired entries. The cache can serialize its entire contents to disk using Go's gob encodi

    Gocachegolibrary
    View on GitHub↗8,828
  • boltdb/boltboltdb avatar

    boltdb/bolt

    14,642View on GitHub↗

    Bolt is a single-file embedded key-value store for Go applications. It is an ACID transactional database that organizes data in B+trees on disk to provide efficient sorted key retrieval and range scans. The system uses a memory-mapped model to map the database file directly into the process address space for fast random-access reads. The project distinguishes itself through a multi-version concurrency control architecture that allows multiple simultaneous readers to access a consistent snapshot of data without blocking a writer. It employs a single-writer multi-reader locking model and uses a

    Go
    View on GitHub↗14,642
  • dgraph-io/ristrettodgraph-io avatar

    dgraph-io/ristretto

    6,932View on GitHub↗

    Ristretto is a high-performance in-memory cache and concurrent key-value store for Go applications. It provides a thread-safe memory store that manages strict memory bounds and employs probabilistic set filters to reduce lookup overhead. The system is distinguished by an admission-policy cache that utilizes frequency sketches and cost-based eviction to maximize hit ratios. It minimizes contention and improves throughput through the use of striped ring buffers and concurrent map sharding. The project covers a broad range of data management capabilities, including time-based expiration, item f

    Go
    View on GitHub↗6,932
  • hashicorp/golang-lruhashicorp avatar

    hashicorp/golang-lru

    5,091View on GitHub↗

    This is a thread-safe in-memory cache library for Go that automatically evicts the least recently used items when capacity is reached. It provides a fixed-size memory cache designed to maintain a constant memory footprint by removing the oldest entries as new data arrives. The system includes an eviction manager that executes custom callbacks when entries are purged to facilitate resource cleanup. It also supports time-based expiration, allowing for the automatic removal of items after a specified time-to-live duration. The library covers general caching capabilities including cache inspecti

    Go
    View on GitHub↗5,091
Compare all 30 related projects→

Frequently asked questions

What does pmylund/go-cache do?

go-cache is a thread-safe, in-memory key-value store for single-machine applications. It provides a local caching mechanism that stores objects in RAM to reduce redundant data retrieval and avoid the overhead of network protocols or serialization.

What are the main features of pmylund/go-cache?

The main features of pmylund/go-cache are: In-Memory State Maps, Go In-Memory Caches, In-Memory Caches, Key-Value Stores, Time-Based Expirations, Mutexes and Locks, Concurrent Data Structures, Cache State Persistences.

Which projects share features with pmylund/go-cache?

Projects with overlapping indexed features include: patrickmn/go-cache — go-cache is a thread-safe, in-memory cache library for Go that stores arbitrary objects with per-item expiration… boltdb/bolt — Bolt is a single-file embedded key-value store for Go applications. It is an ACID transactional database that… dgraph-io/ristretto — Ristretto is a high-performance in-memory cache and concurrent key-value store for Go applications. It provides a… hashicorp/golang-lru — This is a thread-safe in-memory cache library for Go that automatically evicts the least recently used items when… allegro/bigcache — Bigcache is a thread-safe, in-memory key-value store for Go designed to minimize garbage collection pauses. It… ptarjan/node-cache — Node-cache is a lightweight in-memory data storage module designed for Node.js applications. It functions as a…