BitFaster.Caching 2.5.2

Prefix Reserved
dotnet add package BitFaster.Caching --version 2.5.2                
NuGet\Install-Package BitFaster.Caching -Version 2.5.2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BitFaster.Caching" Version="2.5.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BitFaster.Caching --version 2.5.2                
#r "nuget: BitFaster.Caching, 2.5.2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install BitFaster.Caching as a Cake Addin
#addin nuget:?package=BitFaster.Caching&version=2.5.2

// Install BitFaster.Caching as a Cake Tool
#tool nuget:?package=BitFaster.Caching&version=2.5.2                

⚡ 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));

Optionally configure ConcurrentLru with a time-based eviction policy, either:

  • Expire after write
  • Expire after access
  • Calculate an expiry time per item

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));

Optionally configure ConcurrentLfu with a time-based eviction policy, either:

  • Expire after write
  • Expire after access
  • Calculate an expiry time per item

Documentation

Please refer to the wiki for API documentation, and an analysis of hit rate, latency and throughput.

Product 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.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (14)

Showing the top 5 NuGet packages that depend on BitFaster.Caching:

Package Downloads
NServiceBus.RabbitMQ

RabbitMQ support for NServiceBus

Splitio

Package Description

NServiceBus.AmazonSQS

NServiceBus.AmazonSQS

Xtensive.Orm

DataObjects.Net is the object-relational mapper (ORM) and business logic layer (BLL) framework

NServiceBus.Transport.AzureStorageQueues

NServiceBus Transport for Azure Storage Queues

GitHub repositories (3)

Showing the top 3 popular GitHub repositories that depend on BitFaster.Caching:

Repository Stars
Flow-Launcher/Flow.Launcher
:mag: Quick file search & app launcher for Windows with community-made plugins
goatcorp/Dalamud
FFXIV plugin framework and API
Nexus-Mods/NexusMods.App
Home of the development of the Nexus Mods App
Version Downloads Last updated
2.5.2 629 9/15/2024
2.5.1 93,345 6/9/2024
2.5.0 49,111 5/9/2024
2.4.1 580,259 12/11/2023
2.4.0 5,412 11/24/2023
2.3.3 25,596 11/11/2023
2.3.2 87,604 10/25/2023
2.3.1 580 10/22/2023
2.3.0 9,858 10/6/2023
2.2.1 26,602 8/22/2023
2.2.0 131,728 4/29/2023
2.1.3 51,279 3/17/2023
2.1.2 8,469 3/11/2023
2.1.1 257,975 10/14/2022
2.1.0 20,272 9/11/2022
2.0.0 1,464,036 7/29/2022
1.1.0 10,147 7/1/2022
1.0.7 157,359 2/13/2022
1.0.6 25,250 11/17/2021
1.0.5 8,504 11/10/2021
1.0.4 34,795 9/11/2021
1.0.3 47,756 5/31/2021
1.0.2 69,503 1/12/2021
1.0.1 25,826 7/9/2020
1.0.0 860 7/2/2020
0.9.4 879 6/19/2020
0.9.3 562 6/16/2020
0.9.2 510 6/15/2020
0.9.1 1,054 6/14/2020