A feature-rich in-memory cache library for Go with support for LRU, LFU, ARC, and expirable entries.
GCache is a high-performance, goroutine-safe in-memory cache library for Go applications. It provides flexible caching strategies like LRU, LFU, and ARC, along with features such as expirable entries and automatic value loading to optimize data access and reduce redundant computations.
Go developers building scalable applications that require efficient in-memory caching, such as web servers, APIs, or data-intensive services needing to minimize database or computation load.
Developers choose GCache for its combination of multiple eviction policies, automatic loading with user-defined functions, and goroutine-safe design, offering a clean API that balances simplicity with advanced caching patterns essential for performance-critical Go systems.
An in-memory cache library for golang. It supports multiple eviction policies: LRU, LFU, ARC
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports LRU, LFU, ARC, and SimpleCache, allowing tailored caching strategies for different access patterns, as detailed in the cache algorithm examples.
Includes LoaderFunc and LoaderExpireFunc to populate the cache on misses, reducing redundant computations and simplifying code, demonstrated in the automatic loading examples.
Built for safe concurrent use in multi-goroutine environments, ensuring thread safety without extra locking, which is essential for scalable Go applications.
Provides hooks like EvictedFunc and AddedFunc for custom logic on cache events, enabling better monitoring and integration, as shown in the event handler examples.
As an in-memory cache, all data is lost on application restart, which may not suit use cases requiring durable cache storage or fault tolerance.
Cannot be used for distributed caching across multiple instances, restricting its applicability to single-server deployments without external coordination.
The README offers only code examples without in-depth guides, performance benchmarks, or best practices, potentially making advanced use cases more challenging to implement.