Unfucked.Caching 0.0.1-beta.6

This is a prerelease version of Unfucked.Caching.
dotnet add package Unfucked.Caching --version 0.0.1-beta.6
                    
NuGet\Install-Package Unfucked.Caching -Version 0.0.1-beta.6
                    
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="Unfucked.Caching" Version="0.0.1-beta.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Unfucked.Caching" Version="0.0.1-beta.6" />
                    
Directory.Packages.props
<PackageReference Include="Unfucked.Caching" />
                    
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 Unfucked.Caching --version 0.0.1-beta.6
                    
#r "nuget: Unfucked.Caching, 0.0.1-beta.6"
                    
#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 Unfucked.Caching@0.0.1-beta.6
                    
#: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=Unfucked.Caching&version=0.0.1-beta.6&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Unfucked.Caching&version=0.0.1-beta.6&prerelease
                    
Install as a Cake Tool

🧰 Unfucked.Caching

NuGet GitHub Actions Testspace Coveralls

Type-safe in-memory cache with optional automatic loaders. Inspired by Guava Cache.

Unfuck your house

Installation

dotnet package add Unfucked.Caching
using Unfucked.Caching;

Usage

Setting and getting values

Manual
using Cache<string, int> cache = new InMemoryCache<string, int>();

await cache.Put("a", 1);
int length = await cache.Get("a");
Semi-automatic
using Cache<string, int> cache = new InMemoryCache<string, int>();

int length = await cache.Get("a", async str => str.Length);
Automatic
using Cache<string, int> cache = new InMemoryCache<string, int>(loader: async str => str.Length);

int length = await cache.Get("a");

Expiration

Manual
cache.Invalidate("a");
cache.InvalidateAll();
Expire after last write
using Cache<string, int> cache = new InMemoryCache<string, int>(options: new CacheOptions {
    ExpireAfterWrite: TimeSpan.FromHours(1)
});
Expire after last read
using Cache<string, int> cache = new InMemoryCache<string, int>(options: new CacheOptions {
    ExpireAfterRead: TimeSpan.FromHours(1)
});
Automatically refresh after last write
using Cache<string, int> cache = new InMemoryCache<string, int>(options: new CacheOptions {
    RefreshAfterWrite: TimeSpan.FromHours(1)
});

All Unfucked libraries

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.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 (2)

Showing the top 2 NuGet packages that depend on Unfucked.Caching:

Package Downloads
Unfucked.HTTP

Fix egregiously broken or missing functionality in System.Net.Http.HttpClient.

Unfucked.STUN

Fix egregiously broken or missing functionality in Stun.Net.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.1-beta.6 214 6/28/2026
0.0.1-beta.5 91 5/5/2026
0.0.1-beta.4 104 4/6/2026
0.0.1-beta.3 218 11/23/2025
0.0.1-beta.2 226 11/6/2025
0.0.1-beta.1 211 4/12/2025
0.0.0-beta3 283 1/20/2025
0.0.0-beta2 160 9/8/2024