VapeCache.Extensions.AspNetCore
1.2.10
See the version list below for details.
dotnet add package VapeCache.Extensions.AspNetCore --version 1.2.10
NuGet\Install-Package VapeCache.Extensions.AspNetCore -Version 1.2.10
<PackageReference Include="VapeCache.Extensions.AspNetCore" Version="1.2.10" />
<PackageVersion Include="VapeCache.Extensions.AspNetCore" Version="1.2.10" />
<PackageReference Include="VapeCache.Extensions.AspNetCore" />
paket add VapeCache.Extensions.AspNetCore --version 1.2.10
#r "nuget: VapeCache.Extensions.AspNetCore, 1.2.10"
#:package VapeCache.Extensions.AspNetCore@1.2.10
#addin nuget:?package=VapeCache.Extensions.AspNetCore&version=1.2.10
#tool nuget:?package=VapeCache.Extensions.AspNetCore&version=1.2.10
VapeCache.Extensions.AspNetCore
ASP.NET Core pipeline hooks for MVC, Minimal APIs, and Blazor output caching backed by VapeCache.
Install
dotnet add package VapeCache.Extensions.AspNetCore
Setup
using Microsoft.AspNetCore.OutputCaching;
using VapeCache.Abstractions.Connections;
using VapeCache.Extensions.AspNetCore;
builder.Services.AddOptions<RedisConnectionOptions>()
.Bind(builder.Configuration.GetSection("RedisConnection"));
builder.Services.AddVapecacheRedisConnections();
builder.Services.AddVapecacheCaching();
builder.Services.AddVapeCacheOutputCaching(options =>
{
options.AddBasePolicy(policy => policy.Expire(TimeSpan.FromSeconds(30)));
}, store =>
{
store.KeyPrefix = "vapecache:output";
store.DefaultTtl = TimeSpan.FromSeconds(30);
});
var app = builder.Build();
app.UseVapeCacheOutputCaching();
app.MapGet("/products/{id:int}", async (int id) => $"product:{id}")
.CacheWithVapeCache();
Named policy registry (dev-friendly)
builder.Services.AddVapeCacheAspNetPolicies(policies =>
{
policies.AddPolicy("products", policy => policy
.Ttl(TimeSpan.FromMinutes(5))
.Tags("products", "catalog")
.VaryByQuery()
.VaryByHeaders("x-tenant-id"));
});
app.MapGet("/products/{id:int}", async (int id) => $"product:{id}")
.CacheWithVapeCache("products");
Inline minimal API policy
app.MapGet("/search", (string q) => Results.Ok($"query:{q}"))
.CacheWithVapeCache(policy => policy
.Ttl(TimeSpan.FromSeconds(60))
.VaryByQuery()
.Tags("search"));
MVC/controller attribute
[VapeCachePolicy("products", TtlSeconds = 300, VaryByQuery = true, CacheTags = new[] { "products" })]
public IActionResult GetProduct(int id) => Ok(new { id });
For MVC/Blazor endpoints, use ASP.NET Core output cache policies/attributes as usual.
This package replaces the default output-cache store with VapeCacheOutputCacheStore.
When EnableTagIndexing = true, tag invalidation metadata is stored in VapeCache so tag evictions work across nodes and survive process restarts.
Sticky Failover Hints (Cluster/Web-Garden)
When Redis is down, in-memory fallback is local to each node. Emit affinity hints so upstream routing can keep sessions sticky:
builder.Services.AddVapeCacheFailoverAffinityHints(options =>
{
options.NodeId = Environment.MachineName;
options.CookieName = "VapeCacheAffinity";
});
var app = builder.Build();
app.UseVapeCacheFailoverAffinityHints();
Headers/cookie emitted:
X-VapeCache-NodeX-VapeCache-Failover-StateVapeCacheAffinitycookie (configurable)
| 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. |
-
net10.0
- VapeCache.Abstractions (>= 1.2.10)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on VapeCache.Extensions.AspNetCore:
| Package | Downloads |
|---|---|
|
VapeCache.Extensions.Aspire
.NET Aspire integration for VapeCache. Adds service discovery, health checks, and OpenTelemetry wiring for Aspire-hosted applications. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.2.22 | 113 | 4/26/2026 |
| 1.2.21 | 108 | 4/26/2026 |
| 1.2.20 | 120 | 4/13/2026 |
| 1.2.19 | 105 | 4/12/2026 |
| 1.2.18 | 112 | 3/30/2026 |
| 1.2.17 | 104 | 3/27/2026 |
| 1.2.15 | 114 | 3/19/2026 |
| 1.2.14 | 112 | 3/18/2026 |
| 1.2.13 | 167 | 3/14/2026 |
| 1.2.12 | 155 | 3/14/2026 |
| 1.2.11 | 156 | 3/14/2026 |
| 1.2.10 | 160 | 3/13/2026 |
| 1.2.9 | 164 | 3/12/2026 |
| 1.2.8 | 162 | 3/12/2026 |
| 1.2.7 | 161 | 3/11/2026 |
| 1.2.6 | 163 | 3/11/2026 |
| 1.2.5 | 161 | 3/11/2026 |
| 1.2.4 | 163 | 3/10/2026 |
| 1.2.3 | 162 | 3/10/2026 |
| 1.2.2 | 151 | 3/10/2026 |
1.2.10 release: stabilized Redis telemetry parser metrics, hardened connection registration across DI and Autofac, and refreshed production-capable documentation.