Skip to content

Commit f24ceb7

Browse files
authored
update readme (#302)
* rme * build
1 parent da2b19d commit f24ceb7

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

.github/workflows/gate.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@ name: Build
22

33
on:
44
push:
5-
paths-ignore: [ '**.md' ]
65
branches: [ main ]
76
pull_request:
8-
paths-ignore: [ '**.md' ]
97
branches: [ main ]
108

119
jobs:

BitFaster.Caching/ReadMe.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,25 @@ High performance, thread-safe in-memory caching primitives for .NET.
44

55
## ConcurrentLru
66

7-
`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.
7+
`ConcurrentLru` is a light weight drop in replacement for `ConcurrentDictionary`, but with bounded size enforced by the TU-Q eviction policy (based on [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.
88

99
Choose a capacity and use just like `ConcurrentDictionary`, but with bounded size:
1010

1111
```csharp
12-
int capacity = 666;
12+
int capacity = 128;
1313
var lru = new ConcurrentLru<string, SomeItem>(capacity);
1414

1515
var value = lru.GetOrAdd("key", (key) => new SomeItem(key));
1616
```
1717

1818
## ConcurrentLfu
1919

20-
`ConcurrentLfu` is a drop in replacement for `ConcurrentDictionary`, but with bounded size enforced by the [W-TinyLFU eviction policy](https://arxiv.org/pdf/1512.00727.pdf). `ConcurrentLfu` has near optimal hit rate. Reads and writes are buffered then replayed asynchronously to mitigate lock contention.
20+
`ConcurrentLfu` is a drop in replacement for `ConcurrentDictionary`, but with bounded size enforced by the [W-TinyLFU admission policy](https://arxiv.org/pdf/1512.00727.pdf). `ConcurrentLfu` has near optimal hit rate and high scalability. Reads and writes are buffered then replayed asynchronously to mitigate lock contention.
2121

2222
Choose a capacity and use just like `ConcurrentDictionary`, but with bounded size:
2323

2424
```csharp
25-
int capacity = 666;
25+
int capacity = 128;
2626
var lfu = new ConcurrentLfu<string, SomeItem>(capacity);
2727

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

0 commit comments

Comments
 (0)