NTDLS.FastMemoryCache
1.4.0
See the version list below for details.
dotnet add package NTDLS.FastMemoryCache --version 1.4.0
NuGet\Install-Package NTDLS.FastMemoryCache -Version 1.4.0
<PackageReference Include="NTDLS.FastMemoryCache" Version="1.4.0" />
<PackageVersion Include="NTDLS.FastMemoryCache" Version="1.4.0" />
<PackageReference Include="NTDLS.FastMemoryCache" />
paket add NTDLS.FastMemoryCache --version 1.4.0
#r "nuget: NTDLS.FastMemoryCache, 1.4.0"
#:package NTDLS.FastMemoryCache@1.4.0
#addin nuget:?package=NTDLS.FastMemoryCache&version=1.4.0
#tool nuget:?package=NTDLS.FastMemoryCache&version=1.4.0
NTDLS.FastMemoryCache
Provides fast and easy to use thread-safe partitioned memory cache for C# that helps manage the maximum size and track performance.
Quick and easy eample of a file cache:
Using the memory cache is easy, just initialize and upsert some values. You can also pass a configuration parameter to set max memory size, cache scavange rate and partition count.
readonly PartitionedMemoryCache _cache = new();
public string ReadFileFromDisk(string path)
{
string cacheKey = path.ToLower();
if (_cache.TryGet<string>(cacheKey, out var cachedObject))
{
return cachedObject;
}
string fileContents = File.ReadAllText(path);
_cache.Upsert(cacheKey, fileContents, fileContents.Length * sizeof(char));
return fileContents;
}
License
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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 is compatible. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net6.0
- NTDLS.Semaphore (>= 1.5.0)
-
net7.0
- NTDLS.Semaphore (>= 1.5.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on NTDLS.FastMemoryCache:
| Package | Downloads |
|---|---|
|
NTDLS.KitKey.Server
A low latency, high-performance, and reliable persistent or ephemeral key-value store over TCP/IP. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.9.3 | 320 | 11/13/2025 |
| 1.9.2 | 293 | 5/2/2025 |
| 1.9.1 | 201 | 3/2/2025 |
| 1.9.0 | 307 | 1/8/2025 |
| 1.7.14 | 169 | 1/8/2025 |
| 1.7.13 | 196 | 1/4/2025 |
| 1.7.12 | 221 | 1/4/2025 |
| 1.7.11 | 192 | 12/31/2024 |
| 1.7.10 | 195 | 12/3/2024 |
| 1.7.9 | 191 | 10/22/2024 |
| 1.7.8 | 186 | 10/13/2024 |
| 1.7.7 | 176 | 10/13/2024 |
| 1.7.6 | 181 | 10/13/2024 |
| 1.7.5 | 221 | 8/25/2024 |
| 1.7.4 | 210 | 8/24/2024 |
| 1.7.3 | 229 | 8/24/2024 |
| 1.7.2 | 194 | 8/24/2024 |
| 1.7.1 | 218 | 8/13/2024 |
| 1.7.0 | 152 | 8/3/2024 |
| 1.6.4 | 212 | 8/1/2024 |
| 1.6.3 | 171 | 8/1/2024 |
| 1.6.2 | 173 | 8/1/2024 |
| 1.6.1 | 172 | 8/1/2024 |
| 1.6.0 | 175 | 8/1/2024 |
| 1.5.4 | 166 | 8/1/2024 |
| 1.5.3 | 161 | 7/31/2024 |
| 1.5.2 | 181 | 6/20/2024 |
| 1.5.1 | 226 | 1/22/2024 |
| 1.5.0 | 259 | 12/7/2023 |
| 1.4.4 | 228 | 11/15/2023 |
| 1.4.3 | 217 | 11/10/2023 |
| 1.4.2 | 197 | 11/3/2023 |
| 1.4.1 | 228 | 10/17/2023 |
| 1.4.0 | 233 | 10/12/2023 |
| 1.3.0 | 229 | 10/11/2023 |
Added net 6, 7 and documentation and lots of new metriocs.