Tharga.Cache.File 0.3.8

There is a newer version of this package available.
See the version list below for details.
dotnet add package Tharga.Cache.File --version 0.3.8
                    
NuGet\Install-Package Tharga.Cache.File -Version 0.3.8
                    
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.3.8" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Tharga.Cache.File" Version="0.3.8" />
                    
Directory.Packages.props
<PackageReference Include="Tharga.Cache.File" />
                    
Project 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.3.8
                    
#r "nuget: Tharga.Cache.File, 0.3.8"
                    
#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.3.8
                    
#: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.3.8
                    
Install as a Cake Addin
#tool nuget:?package=Tharga.Cache.File&version=0.3.8
                    
Install as a Cake Tool

Tharga.Cache.File

NuGet Nuget License

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 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.

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.0 113 4/6/2026
0.3.8 86 4/6/2026
0.3.7 94 4/6/2026
0.3.6 96 3/25/2026
0.3.5 111 2/8/2026
0.3.0 114 2/3/2026
0.2.13 206 12/13/2025
0.2.11 165 12/13/2025