awesome-repositories.com
المدونة
awesome-repositories.com

اكتشف أفضل مستودعات المصادر المفتوحة باستخدام بحث مدعوم بالذكاء الاصطناعي.

استكشفعمليات بحث منسقةبدائل مفتوحة المصدربرمجيات ذاتية الاستضافةالمدونةخريطة الموقع
المشروعحولكيفية ترتيب النتائجالصحافةخادم MCP
قانونيالخصوصيةالشروط
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
patrickmn avatar

patrickmn/go-cache

0
View on GitHub↗
8,828 نجوم·904 تفرعات·Go·MIT·4 مشاهداتpatrickmn.com/projects/go-cache↗

Go Cache

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 encoding format, allowing cached data to survive application restarts and be reloaded on startup.

The library supports storing any Go object with configurable expiration durations, from temporary entries to items that persist indefinitely. Its file serialization uses gob encoding for type-safe cross-version compatibility, making it suitable for single-machine applications that need a lightweight alternative to external caching systems.

Features

  • Go In-Memory Caches - Provides an in-memory key-value store for Go applications with configurable expiration and concurrent access.
  • Concurrent Caches - Shares a cache safely across multiple goroutines without manual locking or race conditions.
  • Lazy Expiration - Checks expiration timestamps during cache access and periodic sweeps to remove stale entries.
  • In-Memory Caches - Stores frequently accessed data in memory to reduce latency and database load for single-machine applications.
  • Key-Value Stores - Provides a simple in-memory key-value store as a lightweight alternative to external caching systems.
  • RWMutex-Guarded Stores - Uses a sync.RWMutex to allow multiple readers or a single writer without race conditions.
  • Cache Expiration Management - Automatically removes cached items after a configurable duration to ensure data freshness.
  • Time-To-Live Expirations - Attaches a creation time and duration to each cached entry for precise expiration checks.
  • Background Cleanup Intervals - Provides a background goroutine that periodically purges expired cache entries at configurable intervals.
  • Cache State Persistences - Saves the in-memory cache to a file and reloads it on startup for recovery after restarts.
  • Cache-to-Disk Serializations - Persists the in-memory cache to a file and reloads it on startup to recover from downtime.
  • Cache State Serializations - Serializes the entire cache to a file using gob encoding for disk persistence and recovery after restarts.
  • Caching Libraries - Simple in-memory KV cache.
  • Databases and Storage - A simple in-memory key-value store for single-node applications.
  • Key-Value Stores - In-memory key-value cache for single-machine applications.

سجل النجوم

مخطط تاريخ النجوم لـ patrickmn/go-cacheمخطط تاريخ النجوم لـ patrickmn/go-cache

بحث بالذكاء الاصطناعي

استكشف المزيد من المستودعات الرائعة

صف ما تحتاجه بلغة بسيطة — وسيقوم الذكاء الاصطناعي بترتيب آلاف المشاريع مفتوحة المصدر المنسقة حسب الصلة.

Start searching with AI

مجموعات مختارة تضم Go Cache

مجموعات منسقة بعناية يظهر فيها 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 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.

ما هي الميزات الرئيسية لـ patrickmn/go-cache؟

الميزات الرئيسية لـ patrickmn/go-cache هي: Go In-Memory Caches, Concurrent Caches, Lazy Expiration, In-Memory Caches, Key-Value Stores, RWMutex-Guarded Stores, Cache Expiration Management, Time-To-Live Expirations.

ما هي البدائل مفتوحة المصدر لـ patrickmn/go-cache؟

تشمل البدائل مفتوحة المصدر لـ patrickmn/go-cache: dgraph-io/ristretto — Ristretto is a high-performance in-memory cache and concurrent key-value store for Go applications. It provides a… pmylund/go-cache — go-cache is a thread-safe, in-memory key-value store for single-machine applications. It provides a local caching… coocood/freecache — freecache is a high-performance, concurrent in-memory key-value store library for Go applications. It functions as a… hashicorp/golang-lru — This is a thread-safe in-memory cache library for Go that automatically evicts the least recently used items when… olric-data/olric — Olric is a distributed data grid and in-memory key-value store that partitions and replicates data across a cluster of… allegro/bigcache — Bigcache is a thread-safe, in-memory key-value store for Go designed to minimize garbage collection pauses. It…

بدائل مفتوحة المصدر لـ Go Cache

مشاريع مفتوحة المصدر مشابهة، مرتبة حسب عدد الميزات المشتركة مع Go Cache.
  • dgraph-io/ristrettoالصورة الرمزية لـ dgraph-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
  • pmylund/go-cacheالصورة الرمزية لـ pmylund

    pmylund/go-cache

    8,828عرض على GitHub↗

    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

    Go
    عرض على GitHub↗8,828
  • coocood/freecacheالصورة الرمزية لـ coocood

    coocood/freecache

    5,399عرض على GitHub↗

    freecache is a high-performance, concurrent in-memory key-value store library for Go applications. It functions as a fixed-size cache that manages large volumes of data while eliminating garbage collection overhead through the use of preallocated memory and off-heap storage. The system maintains a predictable memory footprint by utilizing fixed memory allocation and circular buffer management, where new entries automatically overwrite the oldest data upon reaching capacity. It further reduces contention between simultaneous readers and writers through lock-striped concurrent access. The libr

    Go
    عرض على GitHub↗5,399
  • hashicorp/golang-lruالصورة الرمزية لـ hashicorp

    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
عرض جميع البدائل الـ 30 لـ Go Cache→