From d3a781cc592ce807c4ec6c90ec79d68eff6e8a28 Mon Sep 17 00:00:00 2001 From: Alex Peck Date: Mon, 6 Nov 2023 21:03:45 -0800 Subject: [PATCH] Update README.md (#454) --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index fb716bc2..bbf94be3 100644 --- a/README.md +++ b/README.md @@ -26,12 +26,12 @@ BitFaster.Caching is installed from NuGet: ## ConcurrentLru -`ConcurrentLru` is a light weight drop in replacement for `ConcurrentDictionary`, but with bounded size enforced by the TU-Q eviction policy (similar to [2Q](https://www.vldb.org/conf/1994/P439.PDF)). There are no background threads, no global locks, concurrent throughput is high, lookups are fast and hit rate outperforms a pure LRU in all tested scenarios. +`ConcurrentLru` is a light weight drop in replacement for `ConcurrentDictionary`, but with bounded size enforced by the TU-Q eviction policy (derived from [2Q](https://www.vldb.org/conf/1994/P439.PDF)). There are no background threads, no global locks, concurrent throughput is high, lookups are fast and hit rate outperforms a pure LRU in all tested scenarios. Choose a capacity and use just like `ConcurrentDictionary`, but with bounded size: ```csharp -int capacity = 666; +int capacity = 128; var lru = new ConcurrentLru(capacity); var value = lru.GetOrAdd("key", (key) => new SomeItem(key)); @@ -44,7 +44,7 @@ var value = lru.GetOrAdd("key", (key) => new SomeItem(key)); Choose a capacity and use just like `ConcurrentDictionary`, but with bounded size: ```csharp -int capacity = 666; +int capacity = 128; var lfu = new ConcurrentLfu(capacity); var value = lfu.GetOrAdd("key", (key) => new SomeItem(key));