Skip to content

Commit d3a781c

Browse files
authored
Update README.md (#454)
1 parent 175e9d5 commit d3a781c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ BitFaster.Caching is installed from NuGet:
2626

2727
## ConcurrentLru
2828

29-
`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.
29+
`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.
3030

3131
Choose a capacity and use just like `ConcurrentDictionary`, but with bounded size:
3232

3333
```csharp
34-
int capacity = 666;
34+
int capacity = 128;
3535
var lru = new ConcurrentLru<string, SomeItem>(capacity);
3636

3737
var value = lru.GetOrAdd("key", (key) => new SomeItem(key));
@@ -44,7 +44,7 @@ var value = lru.GetOrAdd("key", (key) => new SomeItem(key));
4444
Choose a capacity and use just like `ConcurrentDictionary`, but with bounded size:
4545

4646
```csharp
47-
int capacity = 666;
47+
int capacity = 128;
4848
var lfu = new ConcurrentLfu<string, SomeItem>(capacity);
4949

5050
var value = lfu.GetOrAdd("key", (key) => new SomeItem(key));

0 commit comments

Comments
 (0)