Skip to content

Commit 1988a4e

Browse files
Create TTL map with time wheel architecture and tests
* Implement TTLMap with DashMap + time wheel for O(1) TTL operations * Add 10 test cases covering basic functionality, manual GC, and concurrent access * Add concurrent tests with multiple async tasks for safety verification * The TTL map uses a circular time wheel for efficient batch expiration, avoiding the performance issues of retain() operations on large maps * Tests validate O(1) TTL operations, proper expiration batching, and thread safety of the DashMap + time wheel architecture
1 parent 0dbf427 commit 1988a4e

File tree

2 files changed

+484
-0
lines changed

2 files changed

+484
-0
lines changed

src/common/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
pub mod ttl_map;
12
pub mod util;

0 commit comments

Comments
 (0)