![]() |
VOOZH | about |
dotnet add package Microsoft.Extensions.Caching.Hybrid --version 10.7.0
NuGet\Install-Package Microsoft.Extensions.Caching.Hybrid -Version 10.7.0
<PackageReference Include="Microsoft.Extensions.Caching.Hybrid" Version="10.7.0" />
<PackageVersion Include="Microsoft.Extensions.Caching.Hybrid" Version="10.7.0" />Directory.Packages.props
<PackageReference Include="Microsoft.Extensions.Caching.Hybrid" />Project file
paket add Microsoft.Extensions.Caching.Hybrid --version 10.7.0
#r "nuget: Microsoft.Extensions.Caching.Hybrid, 10.7.0"
#:package Microsoft.Extensions.Caching.Hybrid@10.7.0
#addin nuget:?package=Microsoft.Extensions.Caching.Hybrid&version=10.7.0Install as a Cake Addin
#tool nuget:?package=Microsoft.Extensions.Caching.Hybrid&version=10.7.0Install as a Cake Tool
This package contains a concrete implementation of the HybridCache API,
simplifying and enhancing cache usage that might previously have been built on top of IDistributedCache.
Key features:
IDistributedCache - all existing cache backends (Redis, SQL Server, CosmosDB, etc) should work immediatelyIBufferDistributedCache APIFull HybridCache documentation is here.
See learn.microsoft.com for full discussion of HybridCache.
From the command-line:
dotnet add package Microsoft.Extensions.Caching.Hybrid
Or directly in the C# project file:
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Caching.Hybrid" Version="[CURRENTVERSION]" />
</ItemGroup>
The HybridCache service can be registered and configured via IServiceCollection, for example:
builder.Services.AddHybridCache(/* optional configuration /*);
Note that in many cases you may also wish to register a distributed cache backend, as discussed here; for example a Redis instance:
builder.Services.AddStackExchangeRedisCache(options =>
{
options.Configuration = builder.Configuration.GetConnectionString("MyRedisConStr");
});
Once registered, the HybridCache instance can be obtained via dependency-injection, allowing the
GetOrCreateAsync API to be used to obtain data:
public class SomeService(HybridCache cache)
{
private HybridCache _cache = cache;
public async Task<SomeDataType> GetSomeInfoAsync(string name, int id, CancellationToken token = default)
{
return await _cache.GetOrCreateAsync(
$"{name}-{id}", // Unique key to the cache entry
async cancel => await GetDataFromTheSourceAsync(name, id, cancel),
cancellationToken: token
);
}
private async Task<SomeDataType> GetDataFromTheSourceAsync(string name, int id, CancellationToken token)
{
// talk to the underlying data store here - could be SQL, gRPC, HTTP, etc
}
}
Additional usage guidance - including expiration, custom serialization support, and alternate usage to reduce delegate allocation - is available on learn.microsoft.com.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 is compatible. |
| .NET Framework | net461 net461 was computed. net462 net462 is compatible. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 5 NuGet packages that depend on Microsoft.Extensions.Caching.Hybrid:
| Package | Downloads |
|---|---|
|
Duende.IdentityServer
OpenID Connect and OAuth 2.0 Framework for ASP.NET Core |
|
|
Umbraco.Cms.Web.Common
Contains the web assembly needed to run Umbraco CMS. |
|
|
Volo.Abp.Caching
Package Description |
|
|
Duende.AccessTokenManagement
Automatic access token management for OAuth client credential flows |
|
|
Umbraco.Cms.Web.Website
Contains the website assembly needed to run the frontend of Umbraco CMS. |
Showing the top 20 popular GitHub repositories that depend on Microsoft.Extensions.Caching.Hybrid:
| Repository | Stars |
|---|---|
|
abpframework/abp
Open-source web application framework for ASP.NET Core! Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET. Provides the fundamental infrastructure, cross-cutting-concern implementations, startup templates, application modules, UI themes, tooling and documentation.
|
|
|
dotnet/AspNetCore.Docs
Documentation for ASP.NET Core
|
|
|
Kareadita/Kavita
Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.
|
|
|
fullstackhero/dotnet-starter-kit
Production Grade Cloud-Ready .NET 10 Starter Kit (Web API + React Client) with Multitenancy Support, and Clean/Modular Architecture that saves roughly 200+ Development Hours! All Batteries Included.
|
|
|
umbraco/Umbraco-CMS
Umbraco is a free and open source .NET content management system helping you deliver delightful digital experiences.
|
|
|
ZiggyCreatures/FusionCache
FusionCache is an easy to use, fast and robust hybrid cache with advanced resiliency features.
|
|
|
microsoft/mcp
Catalog of official Microsoft MCP (Model Context Protocol) server implementations for AI-powered data access and tool integration
|
|
|
phongnguyend/Practical.CleanArchitecture
Full-stack .Net 10 Clean Architecture (Microservices, Modular Monolith, Monolith), Blazor, Angular 21, React 19, Vue 3.5, BFF with YARP, NextJs 16, Domain-Driven Design, CQRS, SOLID, Asp.Net Core Identity Custom Storage, OpenID Connect, EF Core, OpenTelemetry, SignalR, Background Services, Health Checks, Rate Limiting, Clouds (Azure, AWS, GCP), ...
|
|
|
DuendeSoftware/products
The most flexible and standards-compliant OpenID Connect and OAuth 2.x framework for ASP.NET Core
|
|
|
mehdihadeli/food-delivery-microservices
🍔 A practical and cloud-native food delivery microservices, built with .Net Aspire, .Net 9, MassTransit, Domain-Driven Design, CQRS, Vertical Slice Architecture, Event-Driven Architecture, and the latest technologies.
|
|
|
CodeMazeBlog/CodeMazeGuides
The main repository for all the Code Maze guides
|
|
|
VahidN/EFCoreSecondLevelCacheInterceptor
EF Core Second Level Cache Interceptor
|
|
|
getcellm/cellm
Use LLMs in Excel formulas
|
|
|
erwinkramer/bank-api
The Bank API is a design reference project suitable to bootstrap development for a compliant and modern API.
|
|
|
NikiforovAll/keycloak-authorization-services-dotnet
Authentication and Authorization with Keycloak and ASP.NET Core 🔐
|
|
|
SimonCropp/Replicant
A wrapper for HttpClient that caches to disk. Cached files, over the max specified, are deleted based on the last access times.
|
|
|
codewithmukesh/dotnet-webapi-zero-to-hero-course
Learn .NET 10 Web APIs the Right Way – From Basics to Production-Ready!
|
|
|
mehmetozkaya/Design-Microservices-Architecture-with-Patterns-Principles
Design Microservices Architecture with Patterns & Principles. Design Microservices Architecture with Design Patterns, Principles and the Best Practices. How to handle millions of request with designing system for high availability, high scalability, low latency, and resilience to network failures on distributed microservices.
|
|
|
dashiell-zhang/NetEngine
基于 .Net 框架搭建的一个基础项目结构
|
|
|
markjprice/cs13net9
Repository for the Packt Publishing book titled "C# 13 and .NET 9 - Modern Cross-Platform Development Fundamentals" by Mark J. Price
|
| Version | Downloads | Last Updated |
|---|---|---|
| 10.7.0 | 60,349 | 6/9/2026 |
| 10.6.0 | 432,737 | 5/12/2026 |
| 10.5.0 | 795,052 | 4/15/2026 |
| 10.4.0 | 984,268 | 3/10/2026 |
| 10.3.0 | 697,298 | 2/10/2026 |
| 10.2.0 | 771,552 | 1/13/2026 |
| 10.1.0 | 704,454 | 12/9/2025 |
| 10.0.0 | 3,357,814 | 11/11/2025 |
| 9.10.0 | 1,341,962 | 10/14/2025 |
| 9.9.0 | 1,581,927 | 9/9/2025 |
| 9.8.0 | 656,429 | 8/12/2025 |
| 9.7.0 | 729,283 | 7/8/2025 |
| 9.6.0 | 672,157 | 6/10/2025 |
| 9.5.0 | 821,735 | 5/13/2025 |
| 9.4.0 | 2,763,855 | 4/8/2025 |
| 9.3.0 | 1,818,641 | 3/11/2025 |
| 9.2.0-preview.1.25105.6 | 104,713 | 2/11/2025 |
| 9.1.0-preview.1.25064.3 | 160,223 | 1/14/2025 |
| 9.0.0-preview.9.24556.5 | 454,889 | 11/12/2024 |
| 9.0.0-preview.9.24507.7 | 87,096 | 10/8/2024 |