Tharga.Cache.File
0.4.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Tharga.Cache.File --version 0.4.0
NuGet\Install-Package Tharga.Cache.File -Version 0.4.0
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="Tharga.Cache.File" Version="0.4.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Tharga.Cache.File" Version="0.4.0" />
<PackageReference Include="Tharga.Cache.File" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Tharga.Cache.File --version 0.4.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Tharga.Cache.File, 0.4.0"
#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.
#:package Tharga.Cache.File@0.4.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Tharga.Cache.File&version=0.4.0
#tool nuget:?package=Tharga.Cache.File&version=0.4.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Tharga.Cache.File
File-based persistence backend for Tharga.Cache. Persist cached data to the local filesystem with multiple serialization formats.
Get Started
dotnet add package Tharga.Cache
dotnet add package Tharga.Cache.File
builder.Services.AddCache(o =>
{
o.AddFileDBOptions(f =>
{
f.CompanyName = "MyCompany";
f.AppName = "MyApp";
f.Format = Format.Json;
});
o.RegisterType<Settings, IFile>();
});
Serialization Formats
| Format | Description |
|---|---|
Json |
Human-readable JSON (default) |
Base64 |
Base64-encoded |
GZip |
GZip-compressed for smaller files |
Brotli |
Brotli-compressed for maximum compression |
Why File Persistence?
- Zero infrastructure — no database or server needed
- Survives restarts — cached data persists on disk
- Great for desktop and console apps — local storage without external dependencies
- Compression options — reduce disk usage with GZip or Brotli
Documentation
Full documentation, configuration options, and samples are available on the GitHub project page.
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Tharga.Cache (>= 0.4.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.4.6 | 44 | 5/18/2026 |
| 0.4.5 | 132 | 5/11/2026 |
| 0.4.4 | 93 | 5/10/2026 |
| 0.4.3 | 82 | 5/6/2026 |
| 0.4.2 | 98 | 4/29/2026 |
| 0.4.1 | 129 | 4/18/2026 |
| 0.4.0 | 144 | 4/6/2026 |
| 0.3.8 | 102 | 4/6/2026 |
| 0.3.7 | 111 | 4/6/2026 |
| 0.3.6 | 109 | 3/25/2026 |
| 0.3.5 | 119 | 2/8/2026 |
| 0.3.0 | 125 | 2/3/2026 |
| 0.2.13 | 215 | 12/13/2025 |
| 0.2.11 | 174 | 12/13/2025 |