![]() |
VOOZH | about |
dotnet add package Tharga.Cache --version 0.4.8
NuGet\Install-Package Tharga.Cache -Version 0.4.8
<PackageReference Include="Tharga.Cache" Version="0.4.8" />
<PackageVersion Include="Tharga.Cache" Version="0.4.8" />Directory.Packages.props
<PackageReference Include="Tharga.Cache" />Project file
paket add Tharga.Cache --version 0.4.8
#r "nuget: Tharga.Cache, 0.4.8"
#:package Tharga.Cache@0.4.8
#addin nuget:?package=Tharga.Cache&version=0.4.8Install as a Cake Addin
#tool nuget:?package=Tharga.Cache&version=0.4.8Install as a Cake Tool
A flexible .NET caching library with multiple cache strategies, configurable eviction policies, and stale-while-revalidate support — all with a clean DI-first API.
CacheOptions.FailOpenOnBackendError, on by default)KeyBuilderICacheMonitordotnet add package Tharga.Cache
// Register
builder.Services.AddCache();
// Use
public class MyService
{
private readonly ITimeToLiveCache _cache;
public MyService(ITimeToLiveCache cache) => _cache = cache;
public Task<Product> GetProductAsync(int id) =>
_cache.GetAsync<Product>($"product-{id}", () => LoadAsync(id), TimeSpan.FromMinutes(10));
}
Extend with optional packages to persist beyond memory:
| Package | Backend |
|---|---|
| Tharga.Cache.Redis | Redis |
| Tharga.Cache.MongoDB | MongoDB |
| Tharga.Cache.File | Local files |
Full documentation, configuration options, and samples are available on the GitHub project page.
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 5 NuGet packages that depend on Tharga.Cache:
| Package | Downloads |
|---|---|
|
Quilt4Net.Toolkit
Tools for Health checks via Quilt4Net.Toolkit.Api and Application Insigts. |
|
|
Tharga.Cache.Redis
Redis cache features. |
|
|
Tharga.Cache.MongoDB
MongoDB cache features. |
|
|
Tharga.Cache.Blazor
Component for manageing the Tharga Cache features in blazor. |
|
|
Tharga.Cache.File
File cache features. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.4.8 | 125 | 6/15/2026 |
| 0.4.7 | 592 | 6/11/2026 |
| 0.4.6 | 1,218 | 5/18/2026 |
| 0.4.5 | 245 | 5/11/2026 |
| 0.4.4 | 554 | 5/10/2026 |
| 0.4.3 | 493 | 5/6/2026 |
| 0.4.2 | 430 | 4/29/2026 |
| 0.4.1 | 684 | 4/18/2026 |
| 0.4.0 | 347 | 4/6/2026 |
| 0.3.8 | 156 | 4/6/2026 |
| 0.3.7 | 163 | 4/6/2026 |
| 0.3.6 | 722 | 3/25/2026 |
| 0.3.5 | 551 | 2/8/2026 |
| 0.3.0 | 168 | 2/3/2026 |
| 0.2.13 | 1,269 | 12/13/2025 |
| 0.2.11 | 260 | 12/13/2025 |
| 0.2.9 | 442 | 11/30/2025 |
| 0.2.7 | 407 | 11/17/2025 |
| 0.2.5 | 372 | 11/12/2025 |
| 0.2.3 | 351 | 11/12/2025 |