Add MsgBlock write cache (mirrors Go's msgBlock.cache) to serve reads for recently-written records without disk I/O; cleared on block seal via RotateBlock. Add HashWheel-based TTL expiry in FileStore (ExpireFromWheel / RegisterTtl), replacing the O(n) linear scan on every append with an O(expired) wheel scan. Implement StoreMsg sync method with per-message TTL override support. Add 10 tests covering cache hits/eviction, wheel expiry, retention, StoreMsg seq/ts, per-msg TTL, and recovery re-registration.
13 KiB
13 KiB