From 570b702667bc6a9baab00987eef46b6a50342c07 Mon Sep 17 00:00:00 2001 From: Arthur Silva Date: Sun, 1 Sep 2024 15:17:04 +0200 Subject: [PATCH] Update README.md The original algorithm approximated CLOCK-pro, but deviated over time. Now that S3-FIFO has been published, it's actually much closer to that. --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index fb38c5c8..5cc1345b 100644 --- a/README.md +++ b/README.md @@ -72,22 +72,22 @@ and can be overkill for your use case. Sometimes simpler caches like The following table shows the trade-offs between the different cache implementations: -| Feature | Moka v0.12 | Mini Moka v0.10 | Quick Cache v0.3 | +| Feature | Moka v0.12 | Mini Moka v0.10 | Quick Cache v0.6 | |:------- |:---- |:--------- |:----------- | | Thread-safe, sync cache | ✅ | ✅ | ✅ | | Thread-safe, async cache | ✅ | ❌ | ✅ | | Non-concurrent cache | ❌ | ✅ | ✅ | | Bounded by the maximum number of entries | ✅ | ✅ | ✅ | | Bounded by the total weighted size of entries | ✅ | ✅ | ✅ | -| Near optimal hit ratio | ✅ TinyLFU | ✅ TinyLFU | ✅ CLOCK-Pro | +| Near optimal hit ratio | ✅ TinyLFU | ✅ TinyLFU | ✅ S3-FIFO | | Per-key, atomic insertion. (e.g. `get_with` method) | ✅ | ❌ | ✅ | | Cache-level expiration policies (time-to-live and time-to-idle) | ✅ | ✅ | ❌ | | Per-entry variable expiration | ✅ | ❌ | ❌ | -| Eviction listener | ✅ | ❌ | ❌ | +| Eviction listener | ✅ | ❌ | ✅ (via lifecycle hook) | | Lock-free, concurrent iterator | ✅ | ❌ | ❌ | | Lock-per-shard, concurrent iterator | ❌ | ✅ | ❌ | -| Performance, etc. | Moka v0.12 | Mini Moka v0.10 | Quick Cache v0.3 | +| Performance, etc. | Moka v0.12 | Mini Moka v0.10 | Quick Cache v0.6 | |:------- |:---- |:--------- |:----------- | | Small overhead compared to a concurrent hash table | ❌ | ❌ | ✅ | | Does not use background threads | ❌ → ✅ Removed from v0.12 | ✅ | ✅ |