Releases: ldaidone/gomemo
Releases · ldaidone/gomemo
First release
gomemo is a high-performance, thread-safe memoization library for Go that provides automatic deduplication of concurrent calls for the same input. It features pluggable backends, context awareness, automatic TTL management, performance metrics, and comprehensive test coverage (92.1%). The library uses atomic operations for thread safety and provides a clean, idiomatic Go API.
Features
- Thread-safe: Built with concurrent access in mind using singleflight pattern with atomic operations
- Pluggable backends: Support for memory, Redis, and other custom backends via registration system
- Context-aware: Full support for Go contexts for cancellation and timeouts
- TTL management: Automatic expiration of cached values with configurable cleanup
- Performance metrics: Comprehensive metrics collection with hit/miss ratios, latency tracking, and real-time statistics
- Generic: Works with any function type that returns (any, error)
- Deduplication: Prevents duplicate execution of same function with same arguments
- High test coverage: 92.1% test coverage with comprehensive test suite including race detection
- Cache entry management: Thread-safe cache entries with versioning and expiration tracking