The commit modernizes the caching implementation by introducing a pluggable store interface that allows different cache backends. Key changes:
- Add Store interface for custom cache implementations
- Create default TTL-based store for backwards compatibility
- Add example LRU store for memory-bounded caching
- Support cache store configuration via options pattern
- Make cache cleanup logic implementation-specific
- Add comprehensive tests and documentation
The main goals were to:
1. Prevent unbounded memory growth through pluggable stores
2. Enable distributed caching support
3. Maintain backwards compatibility
4. Improve testability and maintainability
Signed-off-by: franchb <hello@franchb.com>