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
Extension methods for setting up caches using Microsoft.Extensions.DependencyInjection.
1
+
Extension methods for setting up [caches](https://github.com/bitfaster/BitFaster.Caching/wiki/Caches) using [Microsoft.Extensions.DependencyInjection](https://www.nuget.org/packages/Microsoft.Extensions.DependencyInjection/).
The builder delegate can be used to configure the cache, see the [wiki](https://github.com/bitfaster/BitFaster.Caching/wiki/ConcurrentLru-Quickstart#builder-api) for details.
14
+
The builder delegate is used to configure the registered cache, see the [wiki](https://github.com/bitfaster/BitFaster.Caching/wiki/ConcurrentLru-Quickstart#builder-api) for more details about the builder API.
15
15
16
16
There is an extension method for each [cache interface](https://github.com/bitfaster/BitFaster.Caching/wiki/Caches):
17
17
18
18
| Extension | Result |
19
19
|-----------|--------|
20
-
| AddLru | Registers `ConcurrentLru<int, int>` as a singleton `ICache<int, int>`|
21
-
| AddAsyncLru | Registers `ConcurrentLru<int, int>` as a singleton `IAsyncCache<int, int>`|
22
-
| AddScopedLru | Registers `ConcurrentLru<int, Disposable>` as a singleton `IScopedCache<int, Disposable>`|
23
-
| AddScopedAsyncLru | Registers `ConcurrentLru<int, Disposable>` as a singleton `IScopedAsyncCache<int, Disposable>`|
20
+
|`AddLru`| Registers `ConcurrentLru<int, int>` as a singleton `ICache<int, int>`|
21
+
|`AddAsyncLru`| Registers `ConcurrentLru<int, int>` as a singleton `IAsyncCache<int, int>`|
22
+
|`AddScopedLru`| Registers `ConcurrentLru<int, Disposable>` as a singleton `IScopedCache<int, Disposable>`|
23
+
|`AddScopedAsyncLru`| Registers `ConcurrentLru<int, Disposable>` as a singleton `IScopedAsyncCache<int, Disposable>`|
The builder delegate can be used to configure the cache, see the [wiki](https://github.com/bitfaster/BitFaster.Caching/wiki/ConcurrentLfu-Quickstart#builder-api) for details.
37
+
The builder delegate is used to configure the registered cache, see the [wiki](https://github.com/bitfaster/BitFaster.Caching/wiki/ConcurrentLfu-Quickstart#builder-api) for more details about the builder API.
38
38
39
39
There is an extension method for each [cache interface](https://github.com/bitfaster/BitFaster.Caching/wiki/Caches):
40
40
41
41
| Extension | Result |
42
42
|-----------|--------|
43
-
| AddLfu | Registers `ConcurrentLfu<int, int>` as a singleton `ICache<int, int>`|
44
-
| AddAsyncLfu | Registers `ConcurrentLfu<int, int>` as a singleton `IAsyncCache<int, int>`|
45
-
| AddScopedLfu | Registers `ConcurrentLfu<int, Disposable>` as a singleton `IScopedCache<int, Disposable>`|
46
-
| AddScopedAsyncLfu | Registers `ConcurrentLfu<int, Disposable>` as a singleton `IScopedAsyncCache<int, Disposable>`|
43
+
|`AddLfu`| Registers `ConcurrentLfu<int, int>` as a singleton `ICache<int, int>`|
44
+
|`AddAsyncLfu`| Registers `ConcurrentLfu<int, int>` as a singleton `IAsyncCache<int, int>`|
45
+
|`AddScopedLfu`| Registers `ConcurrentLfu<int, Disposable>` as a singleton `IScopedCache<int, Disposable>`|
46
+
|`AddScopedAsyncLfu`| Registers `ConcurrentLfu<int, Disposable>` as a singleton `IScopedAsyncCache<int, Disposable>`|
0 commit comments