Innovabit.DotNet.Interceptors.Caching.Hybrid 3.0.136

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

Innovabit.DotNet.Interceptors.Caching.Hybrid

HybridCache store provider for Innovabit.DotNet.Interceptors.Caching.Abstractions: an in-process L1 in front of whatever distributed L2 you configured, with stampede protection built in.

One store, two tiers. A hit usually never leaves the process, a miss falls through to the distributed cache, and concurrent misses for the same key collapse into a single read — close to [Cache] + [SingleFlight] + the Redis store in one dependency.

Usage

services.AddStackExchangeRedisCache(o => o.Configuration = "localhost:6379");   // the L2, optional
services.AddHybridCache();                                                      // Microsoft's own

services
    .AddInterceptors()
    .AddHybridCacheStore();

services.AddScopedWithInterception<IPriceService, PriceService>();

Without an IDistributedCache registered, HybridCache runs L1-only — still useful for the stampede protection alone.

The extension is AddHybridCacheStore, not AddHybridCache, so it cannot be mistaken for Microsoft's own registration. You need both.

What to know

A sliding expiration is honoured as an absolute one. HybridCache has no sliding expiration, so [Cache(SlidingExpirationSeconds = 60)] gives an entry that lives at most a minute rather than a minute past its last read. The entry expires sooner than asked for, never later, which is the safe direction to be wrong in for a cache — but it is a different policy, and a method that genuinely relies on sliding behaviour wants the in-memory or Redis store.

Values are wrapped in a HybridCacheEnvelope<T>. HybridCache exposes no plain read — only GetOrCreateAsync, which cannot say whether it found an entry or created one. Reading through a factory that yields nothing answers that, but only if "nothing" cannot also be a legitimate cached value. The envelope is what keeps a stored null distinguishable from a miss. It is public, so registering your own IHybridCacheSerializer<HybridCacheEnvelope<T>> is a supported way to change how entries are written.

Reads never write. The read path disables both cache tiers' writes, so the "not found" its factory yields is never stored.

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.  net11.0 is compatible. 
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
3.0.136 48 12/5/2026
3.0.135 108 11/30/2026
3.0.134 96 11/30/2026
3.0.133 85 11/30/2026
3.0.132 87 11/30/2026
3.0.129 90 11/30/2026
3.0.128 99 11/30/2026
3.0.127 114 11/30/2026
3.0.126 99 11/30/2026
3.0.125 101 11/30/2026
3.0.124 100 11/28/2026
3.0.123 99 11/28/2026
3.0.122 111 11/21/2026
2.0.121 90 11/21/2026
2.0.120 96 11/21/2026
2.0.119 122 11/14/2026
2.0.118 120 11/7/2026
2.0.117 122 10/31/2026
2.0.116 117 10/26/2026
2.0.115 128 10/17/2026
Loading failed