awesome-repositories.com
博客
MCP
awesome-repositories.com

通过 AI 驱动的搜索,发现最优秀的开源仓库。

探索精选搜索开源替代品自托管软件博客网站地图
项目关于排名机制媒体报道MCP 服务器
法律隐私政策服务条款
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
pmylund avatar

pmylund/go-cache

0
View on GitHub↗
8,828 星标·904 分支·Go·MIT·2 次浏览patrickmn.com/projects/go-cache↗

Go Cache

go-cache 是一个用于单机应用程序的线程安全、内存键值存储。它提供了一种本地缓存机制,将对象存储在 RAM 中,以减少冗余数据检索并避免网络协议或序列化的开销。

该系统具有一个持久化缓存存储,可将内存状态保存到本地文件,从而允许在应用程序重启后恢复数据。

该项目管理跨多个例程的并发数据访问,并为缓存条目实现生存时间(TTL)过期。后台进程定期扫描存储以删除过期项目并释放内存。

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.
  • 数据库 - In-memory key-value store for single-machine applications.
  • Embedded Databases - In-memory key-value store and cache for Go.

Star 历史

pmylund/go-cache 的 Star 历史图表pmylund/go-cache 的 Star 历史图表

AI 搜索

探索更多 awesome 仓库

用简单的语言描述您的需求 —— AI 将根据相关性为您从数千个精选开源项目中进行排序。

Start searching with AI

Go Cache 的开源替代方案

相似的开源项目,按与 Go Cache 的功能重合度排序。
  • patrickmn/go-cachepatrickmn 的头像

    patrickmn/go-cache

    8,828在 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
    在 GitHub 上查看↗8,828
  • boltdb/boltboltdb 的头像

    boltdb/bolt

    14,642在 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
    在 GitHub 上查看↗14,642
  • dgraph-io/ristrettodgraph-io 的头像

    dgraph-io/ristretto

    6,932在 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
    在 GitHub 上查看↗6,932
  • hashicorp/golang-lruhashicorp 的头像

    hashicorp/golang-lru

    5,091在 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
    在 GitHub 上查看↗5,091
查看 Go Cache 的所有 30 个替代方案→

常见问题解答

pmylund/go-cache 是做什么的?

go-cache 是一个用于单机应用程序的线程安全、内存键值存储。它提供了一种本地缓存机制,将对象存储在 RAM 中,以减少冗余数据检索并避免网络协议或序列化的开销。

pmylund/go-cache 的主要功能有哪些?

pmylund/go-cache 的主要功能包括: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。

pmylund/go-cache 有哪些开源替代品?

pmylund/go-cache 的开源替代品包括: 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…