VapeCache.Extensions.DistributedCache
1.2.24
dotnet add package VapeCache.Extensions.DistributedCache --version 1.2.24
NuGet\Install-Package VapeCache.Extensions.DistributedCache -Version 1.2.24
<PackageReference Include="VapeCache.Extensions.DistributedCache" Version="1.2.24" />
<PackageVersion Include="VapeCache.Extensions.DistributedCache" Version="1.2.24" />
<PackageReference Include="VapeCache.Extensions.DistributedCache" />
paket add VapeCache.Extensions.DistributedCache --version 1.2.24
#r "nuget: VapeCache.Extensions.DistributedCache, 1.2.24"
#:package VapeCache.Extensions.DistributedCache@1.2.24
#addin nuget:?package=VapeCache.Extensions.DistributedCache&version=1.2.24
#tool nuget:?package=VapeCache.Extensions.DistributedCache&version=1.2.24
VapeCache.Extensions.DistributedCache
Bridge package for using VapeCache through IDistributedCache and IBufferDistributedCache.
Install
dotnet add package VapeCache.Extensions.DistributedCache
Use This Package When
This package is the migration and interoperability path, not the recommended primary experience.
- Native VapeCache API: recommended
IDistributedCacheadapter: compatibility bridge- FusionCache L2 over VapeCache: supported interop scenario
- Runtime behind the bridge: VapeCache native transport/hybrid runtime (not
StackExchange.Redisruntime coupling)
For the fuller rationale and positioning, see https://github.com/haxxornulled/VapeCache/blob/main/docs/DISTRIBUTED_CACHE_BRIDGE.md.
Usage
using Microsoft.Extensions.Caching.Distributed;
using VapeCache.Abstractions.Connections;
using VapeCache.Extensions.DependencyInjection;
using VapeCache.Extensions.DistributedCache;
builder.Services.AddVapeCache(builder.Configuration)
.UseDistributedCacheAdapter();
Optional adapter settings:
builder.Services.AddVapeCache(builder.Configuration)
.UseDistributedCacheAdapter(options =>
{
options.KeyPrefix = "fusion:l2:";
});
Supported Mapping
Get/GetAsyncSet/SetAsyncRemove/RemoveAsyncRefresh/RefreshAsync- absolute expiration to VapeCache TTL
- sliding expiration via adapter-managed metadata envelope
Compatibility Story
This package is for teams that want to keep an existing IDistributedCache surface and swap the distributed backing layer to VapeCache.
That includes:
- ASP.NET Core middleware or framework code that already expects
IDistributedCache - migration from another distributed-cache provider
- FusionCache hosts that already use the application's registered distributed-cache service as L2
Compatibility Contract
This bridge is designed to let teams adopt VapeCache without destabilizing an existing IDistributedCache-based codebase.
Guaranteed:
- the full public
IDistributedCacheandIBufferDistributedCachemethod surface is implemented - caller-visible expiration behavior is preserved for absolute expiration, relative absolute expiration, and sliding expiration
- ASP.NET Core and other framework consumers that depend on the Microsoft distributed-cache contract can use the adapter as a migration/interoperability layer
- arbitrary binary payloads remain valid payloads from the caller's point of view
Not guaranteed:
- backend storage-format parity with other
IDistributedCacheproviders - provider-specific metadata quirks outside the public contract
- access to native VapeCache features that the Microsoft abstraction does not expose
- a claim that the adapter is the fullest representation of the VapeCache runtime
That line is intentional: this package is the bridge that helps teams move to VapeCache without destabilizing the codebase, not the primary way to use the full native runtime model.
Caveats
- The adapter intentionally flattens VapeCache behind the generic
IDistributedCachecontract. - Native VapeCache capabilities such as typed APIs, cache intent ergonomics, output-cache-specific integration, and transport/runtime tuning are not fully visible through this abstraction.
- Use a
KeyPrefixwhen you want the adapter to coexist cleanly with native VapeCache keys in the same backend. - For FusionCache-style L2 usage, the recommended framing is "route your distributed cache layer through VapeCache with minimal code changes," not "the adapter is the primary VapeCache experience."
Docs
| 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
- Microsoft.Extensions.Caching.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.9)
- VapeCache.Abstractions (>= 1.2.24)
- VapeCache.Extensions.DependencyInjection (>= 1.2.24)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
See GitHub releases and docs/UPGRADE_NOTES.md for release-specific notes.