v0.10.1
- π¦ Version Unification: All crates now use version 0.10.1 for consistency
cachelito: 0.10.0 β 0.10.1cachelito-core: 0.10.0 β 0.10.1cachelito-macros: 0.10.0 β 0.10.1cachelito-macro-utils: 0.10.0 β 0.10.1cachelito-async: 0.2.0 β 0.10.1cachelito-async-macros: 0.2.0 β 0.10.1
Fixed
- π§ Async Cache Integration: Updated
cachelito-asyncandcachelito-async-macros- Async caches now properly support
max_memoryattribute insert_with_memory()method no longer requiresMemoryEstimatorwhenmax_memoryis not specified- Added protection against infinite eviction loops when value size exceeds
max_memory
- Async caches now properly support
Added
- π‘οΈ Infinite Loop Protection: All caches (sync and async) now prevent infinite eviction loops
- When a value's memory size exceeds
max_memory, it's not cached (returns early) - Applies to:
ThreadLocalCache,GlobalCache, andAsyncGlobalCache - New test suite:
memory_limit_edge_cases_tests.rs(7 tests for sync caches) - New test suite:
memory_limit_edge_cases_async_tests.rs(7 tests for async cache)
- When a value's memory size exceeds
- π Code Quality Improvements:
- Eliminated code duplication in
AsyncGlobalCacheby extracting helper methods:find_min_frequency_key()for LFU evictionfind_arc_eviction_key()for ARC eviction
- Consistent with sync cache implementations
- Eliminated code duplication in
What's Changed
Full Changelog: 0.10.0...0.10.1