VapeCache.Abstractions 1.2.2

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

<p align="center"> <img src="assets/vapecache-brand.png" alt="VapeCache logo" width="920" /> </p>

VapeCache

VapeCache is a Redis-first caching runtime for ASP.NET Core and .NET services. It is designed for predictable behavior under load, Redis trouble, and high-throughput API traffic.

  • Redis transport tuned for cache workloads
  • Circuit-breaker and in-memory fallback for outage tolerance
  • Stampede controls for hot keys
  • OpenTelemetry metrics + traces
  • ASP.NET Core and Aspire integrations

OSS scope in this repository: production-ready runtime packages for core caching, invalidation, ASP.NET Core integration, and Aspire integration.

Maturity and Evidence

Current project status: Early Adoption.

QuickStart

  1. Install packages
dotnet add package VapeCache.Runtime
dotnet add package VapeCache.Extensions.Aspire

If you need ASP.NET Core output-cache middleware integration:

dotnet add package VapeCache.Extensions.AspNetCore

If you want a DI composition facade for clean architecture wiring:

dotnet add package VapeCache.Extensions.DependencyInjection
  1. Run Redis
docker run --name vapecache-redis -p 6379:6379 -d redis:7
  1. Configure appsettings.json
{
  "RedisConnection": {
    "Host": "localhost",
    "Port": 6379,
    "Database": 0
  },
  "CacheStampede": {
    "Profile": "Balanced"
  }
}

For production Redis security (TLS, ACL username/password auth, certificate validation), use docs/TLS_SECURITY.md and the auth recipes in docs/CONFIGURATION.md.

  1. Register VapeCache in Program.cs
using VapeCache.Abstractions.Caching;
using VapeCache.Abstractions.Connections;
using VapeCache.Infrastructure.Caching;
using VapeCache.Infrastructure.Connections;

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddOptions<RedisConnectionOptions>()
    .Bind(builder.Configuration.GetSection("RedisConnection"));

builder.Services.AddVapecacheRedisConnections();
builder.Services.AddVapecacheCaching();

builder.Services.AddOptions<CacheStampedeOptions>()
    .UseCacheStampedeProfile(CacheStampedeProfile.Balanced)
    .Bind(builder.Configuration.GetSection("CacheStampede"));
  1. Add one endpoint
var app = builder.Build();

app.MapGet("/products/{id:int}", async (int id, IVapeCache cache, CancellationToken ct) =>
{
    var key = CacheKey<string>.From($"products:{id}");
    var value = await cache.GetOrCreateAsync(
        key,
        _ => new ValueTask<string>($"product-{id}"),
        new CacheEntryOptions(TimeSpan.FromMinutes(5)),
        ct);

    return Results.Ok(value);
});

app.Run();
  1. Go deeper: docs/QUICKSTART.md

Production Packages (OSS)

Package Purpose
VapeCache.Runtime Core runtime, Redis transport, fallback behavior, telemetry
VapeCache.Core Shared primitives package (transitive dependency, usually not installed directly)
VapeCache.Abstractions Public contracts and option/value types
VapeCache.Features.Invalidation Optional key/tag/zone invalidation policies
VapeCache.Extensions.DependencyInjection One-call IServiceCollection wiring facade for runtime + config binding
VapeCache.Extensions.AspNetCore ASP.NET Core output-cache integration
VapeCache.Extensions.Aspire Aspire wiring, health checks, endpoint helpers

Out Of OSS Scope

The following are not shipped from this OSS repository:

  • enterprise licensing and control-plane features
  • durable spill persistence package
  • reconciliation package for post-outage write replay

Documentation

Build And Test

dotnet build VapeCache.slnx -c Release
dotnet test VapeCache.Tests/VapeCache.Tests.csproj -c Release

License

  • Community/non-commercial usage: LICENSE
  • Commercial usage: enterprise license required
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 (10)

Showing the top 5 NuGet packages that depend on VapeCache.Abstractions:

Package Downloads
VapeCache.Extensions.AspNetCore

ASP.NET Core output cache integration for VapeCache. Registers VapeCache as the backing store for ASP.NET Core output caching.

VapeCache.Runtime

Redis transport and caching runtime for VapeCache. Includes multiplexed connections, circuit breaking, pooling, and OpenTelemetry hooks for production cache workloads.

VapeCache.Features.Invalidation

Optional invalidation policy package for VapeCache. Adds policy-driven tag, zone, and key invalidation orchestration with runtime options support.

VapeCache.Extensions.DependencyInjection

DI composition facade for VapeCache runtime registration in clean architecture applications. Provides one-call IServiceCollection wiring with optional configuration binding and stampede profile setup.

VapeCache.Extensions.PubSub

Optional Redis pub/sub capability package for VapeCache. Adds bounded subscription queues, reconnect/resubscribe behavior, and DI/Autofac registration helpers.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.22 231 4/26/2026
1.2.21 180 4/26/2026
1.2.20 206 4/13/2026
1.2.19 182 4/12/2026
1.2.18 192 3/30/2026
1.2.17 163 3/27/2026
1.2.15 176 3/19/2026
1.2.14 172 3/18/2026
1.2.13 190 3/14/2026
1.2.12 176 3/14/2026
1.2.11 161 3/14/2026
1.2.10 167 3/13/2026
1.2.9 163 3/12/2026
1.2.8 156 3/12/2026
1.2.7 157 3/11/2026
1.2.6 156 3/11/2026
1.2.5 160 3/11/2026
1.2.4 164 3/10/2026
1.2.3 163 3/10/2026
1.2.2 141 3/10/2026
Loading failed

1.2.1 release: dependency alignment update for OSS package restore and release automation.