Skip to content

Commit 81640ca

Browse files
authored
Update README.md
1 parent 1ba0e3f commit 81640ca

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,17 @@ High performance, thread-safe in-memory caching primitives for .NET.
1818

1919
# Usage
2020

21-
## LRU: ConcurrentLru, ConcurrentTLru
21+
## ConcurrentLru/ConcurrentTLru
2222

23-
LRU implementations are intended as a drop in replacement for ConcurrentDictionary, and a much faster alternative to the System.Runtime.Caching.MemoryCache family of classes (e.g. HttpRuntime.Cache, System.Web.Caching et. al.).
23+
`ConcurrentLru` and `ConcurrentTLru` are intended as a drop in replacement for `ConcurrentDictionary`, and a much faster alternative to the `System.Runtime.Caching.MemoryCache` family of classes (e.g. `HttpRuntime.Cache`, `System.Web.Caching` etc).
2424

2525
```csharp
2626
int concurrency = 4;
2727
int capacity = 666;
2828
var lru = new ConcurrentLru<int, SomeItem>(concurrency, capacity, EqualityComparer<int>.Default);
2929

3030
var value = lru.GetOrAdd(1, (k) => new SomeItem(k));
31+
var value = await lru.GetOrAddAsync(0, (k) => Task.FromResult(new SomeItem(k)));
3132
```
3233

3334

0 commit comments

Comments
 (0)