You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: BitFaster.Caching/ReadMe.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,9 @@ High performance, thread-safe in-memory caching primitives for .NET.
4
4
5
5
## ConcurrentLru
6
6
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 lock contention, 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 (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.
8
8
9
-
Choose a capacity and use just like ConcurrentDictionary, but with bounded size:
9
+
Choose a capacity and use just like `ConcurrentDictionary`, but with bounded size:
10
10
11
11
```csharp
12
12
intcapacity=666;
@@ -17,9 +17,9 @@ var value = lru.GetOrAdd("key", (key) => new SomeItem(key));
17
17
18
18
## ConcurrentLfu
19
19
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 and replayed asynchronously to mitigate lock contention.
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.
21
21
22
-
Choose a capacity and use just like ConcurrentDictionary, but with bounded size:
22
+
Choose a capacity and use just like `ConcurrentDictionary`, but with bounded size:
23
23
24
24
```csharp
25
25
intcapacity=666;
@@ -30,4 +30,4 @@ var value = lfu.GetOrAdd("key", (key) => new SomeItem(key));
30
30
31
31
## Documentation
32
32
33
-
Please refer to the [wiki](https://github.com/bitfaster/BitFaster.Caching/wiki) for full API documentation, and a complete analysis of hit rate vs cache size, latency and throughput.
33
+
Please refer to the [wiki](https://github.com/bitfaster/BitFaster.Caching/wiki) for full API documentation, and a complete analysis of hit rate, latency and throughput.
0 commit comments