BitFaster.Caching
2.2.1
dotnet add package BitFaster.Caching --version 2.2.1
NuGet\Install-Package BitFaster.Caching -Version 2.2.1
<PackageReference Include="BitFaster.Caching" Version="2.2.1" />
paket add BitFaster.Caching --version 2.2.1
#r "nuget: BitFaster.Caching, 2.2.1"
// Install BitFaster.Caching as a Cake Addin
#addin nuget:?package=BitFaster.Caching&version=2.2.1
// Install BitFaster.Caching as a Cake Tool
#tool nuget:?package=BitFaster.Caching&version=2.2.1
⚡ BitFaster.Caching
High performance, thread-safe in-memory caching primitives for .NET.
ConcurrentLru
ConcurrentLru
is a light weight drop in replacement for ConcurrentDictionary
, but with bounded size enforced by the TU-Q eviction policy (based on 2Q). 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.
Choose a capacity and use just like ConcurrentDictionary
, but with bounded size:
int capacity = 128;
var lru = new ConcurrentLru<string, SomeItem>(capacity);
var value = lru.GetOrAdd("key", (key) => new SomeItem(key));
ConcurrentLfu
ConcurrentLfu
is a drop in replacement for ConcurrentDictionary
, but with bounded size enforced by the W-TinyLFU admission policy. ConcurrentLfu
has near optimal hit rate and high scalability. Reads and writes are buffered then replayed asynchronously to mitigate lock contention.
Choose a capacity and use just like ConcurrentDictionary
, but with bounded size:
int capacity = 128;
var lfu = new ConcurrentLfu<string, SomeItem>(capacity);
var value = lfu.GetOrAdd("key", (key) => new SomeItem(key));
Documentation
Please refer to the wiki for full API documentation, and a complete analysis of hit rate, latency and throughput.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 is compatible. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 3.1
- No dependencies.
-
.NETStandard 2.0
- System.Threading.Tasks.Extensions (>= 4.5.4)
-
net6.0
- No dependencies.
NuGet packages (11)
Showing the top 5 NuGet packages that depend on BitFaster.Caching:
Package | Downloads |
---|---|
NServiceBus.RabbitMQ
RabbitMQ support for NServiceBus |
|
NServiceBus.AmazonSQS
An Amazon SQS transport implementation for NServiceBus |
|
Xtensive.Orm
DataObjects.Net is the object-relational mapper (ORM) and business logic layer (BLL) framework |
|
Harmony.Core
HarmonyCore package that provides base runtime functionality |
|
Redpoint.Vfs.Layer.Folder
A virtual filesystem layer that serves a folder, optionally layered on top of another virtual filesystem layer. This layer is served read-only. |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on BitFaster.Caching:
Repository | Stars |
---|---|
Nexus-Mods/NexusMods.App
Home of the development of the Nexus Mods App
|
Version | Downloads | Last updated |
---|---|---|
2.2.1 | 6,644 | 8/22/2023 |
2.2.0 | 42,914 | 4/29/2023 |
2.1.3 | 38,984 | 3/17/2023 |
2.1.2 | 7,485 | 3/11/2023 |
2.1.1 | 148,360 | 10/14/2022 |
2.1.0 | 10,057 | 9/11/2022 |
2.0.0 | 527,656 | 7/29/2022 |
1.1.0 | 7,383 | 7/1/2022 |
1.0.7 | 147,693 | 2/13/2022 |
1.0.6 | 21,667 | 11/17/2021 |
1.0.5 | 7,419 | 11/10/2021 |
1.0.4 | 27,729 | 9/11/2021 |
1.0.3 | 39,721 | 5/31/2021 |
1.0.2 | 67,706 | 1/12/2021 |
1.0.1 | 24,671 | 7/9/2020 |
1.0.0 | 804 | 7/2/2020 |
0.9.4 | 803 | 6/19/2020 |
0.9.3 | 507 | 6/16/2020 |
0.9.2 | 456 | 6/15/2020 |
0.9.1 | 728 | 6/14/2020 |