Tags: hyp3rd/hypercache
Tags
feat(eviction): robustify all eviction strategies, add config options… …, and improve docs - Refactored all eviction algorithms (LRU, LFU, ARC, Clock, CAWOLFU) for thread safety, zero-capacity handling, and deadlock prevention. - Inlined eviction logic in Clock and CAWOLFU to avoid recursive locking and deadlocks. - Ensured all mutating operations use proper locking and updated value/frequency on duplicate keys. - Improved memory hygiene by resetting pooled items before reuse. - Added buffer size and debounce interval options for expiration trigger channel in config and HyperCache. - Updated README to clarify package paths and usage, and fixed example commands. - Added PRD.md with design review and suggestions. - Updated benchmark to use LRU for proactive eviction test. - Improved code comments and documentation for maintainability.
refactor: update interfaces to use `any`, improve error handling, and…
… enhance documentation
- Refactored all interfaces and implementations to use `any` instead of `interface{}` for type consistency.
- Changed `Remove` methods in service and middleware to return errors for better error propagation.
- Improved documentation comments across multiple files for clarity and consistency.
- Replaced `fmt.Errorf` with `ewrap.Wrap` for error wrapping in serializer and stats collector.
- Fixed import order and formatting in test files.
- Enhanced worker pool logic and fixed worker resizing in `pool.go`.
- Improved stats collection and calculation logic in `stats` package.
- Minor bug fixes and code style improvements throughout the codebase.
PreviousNext