<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/new-caching-in-asp-net-core---hybridcache-o1tedvdgx" -->

---
title: New Caching in ASP.NET Core - HybridCache | daily.dev
description: HybridCache, introduced with .NET 9, combines in-memory (L1) and distributed (L2, e.g. Redis) caching into a unified API, aiming to replace IMemoryCache and...
canonical: https://daily.dev/posts/new-caching-in-asp-net-core---hybridcache-o1tedvdgx
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: New Caching in ASP.NET Core - HybridCache | daily.dev
og:description: HybridCache, introduced with .NET 9, combines in-memory (L1) and distributed (L2, e.g. Redis) caching into a unified API, aiming to replace IMemoryCache and...
og:url: https://daily.dev/posts/new-caching-in-asp-net-core---hybridcache-o1tedvdgx
og:image: https://api.daily.dev/og/posts/o1tEDVdGX.png
og:image:alt: New Caching in ASP.NET Core - HybridCache
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# New Caching in ASP.NET Core - HybridCache

**[NikolaTech](https://daily.dev/sources/nikolatech)** · 6 min read · 0 upvotes · 0 comments

## Summary

HybridCache, introduced with .NET 9, combines in-memory (L1) and distributed (L2, e.g. Redis) caching into a unified API, aiming to replace IMemoryCache and IDistributedCache while offering functionality similar to FusionCache. It supports .NET 9, .NET 8, .NET Framework 4.7+ and .NET Standard 2.0. Key features include stamped protection against cache stampedes, customizable serialization, and tag-based cache invalidation. The library is still in preview and is installed via the Microsoft.Extensions.Caching.Hybrid NuGet package. The walkthrough covers setup, configuration options, and core methods like SetAsync, GetOrCreateAsync, RemoveAsync, and RemoveByTagAsync, plus integrating Redis via StackExchangeRedisCache.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://nikolatech.net/blogs/caching-aspnetcore-hybrid-cache>

## Questions this post answers

### What is HybridCache in .NET 9 and how is it different from IMemoryCache and IDistributedCache?

HybridCache is a new caching library introduced with .NET 9 that unifies in-memory (L1) and distributed (L2, e.g. Redis) caching behind one API, replacing the separate IMemoryCache and IDistributedCache interfaces. It adds stamped protection against redundant parallel cache requests, customizable serialization, and tag-based bulk invalidation. It also works on .NET 8, .NET Framework 4.7+, and .NET Standard 2.0.

_daily.dev surfaces practical breakdowns like this for teams evaluating a move to HybridCache._

### How do I invalidate multiple cache entries at once in HybridCache using tags?

Pass a tags array (e.g. ["products"]) to GetOrCreateAsync when storing entries, then call RemoveByTagAsync with that same tag array to invalidate all entries grouped under it in one call, rather than removing keys individually. This bulk invalidation by tag is one of HybridCache's standout features over the older caching interfaces.

_Developers wiring up cache invalidation strategies can find walkthroughs like this through daily.dev._

### How do I configure HybridCache to use Redis as the distributed cache in ASP.NET Core?

Add the StackExchangeRedis package, call AddStackExchangeRedisCache with your Redis connection string, then call AddHybridCache afterward. Once the Redis IDistributedCache implementation is registered in the DI container, HybridCache automatically uses it as the L2 secondary cache alongside its serializer.

_daily.dev helps backend developers track setup details like this when adding Redis to a caching layer._

## Similar posts on daily.dev

- [Benchmarking HybridCache vs Redis in ASP.NET Core 11](https://daily.dev/posts/benchmarking-hybridcache-vs-redis-in-asp-net-core-11-c8rfx7ksa) · C\# Corner · 0 upvotes · 0 comments
- [Cache Me If You Can: A .NET Caching Survival Guide](https://daily.dev/posts/cache-me-if-you-can-a-net-caching-survival-guide-sydnkz4ko) · ITNEXT · 2 upvotes · 0 comments
- [Solving the Distributed Cache Invalidation Problem with Redis and HybridCache](https://daily.dev/posts/solving-the-distributed-cache-invalidation-problem-with-redis-and-hybridcache-9jhjz3zep) · Milan Jovanović · 2 upvotes · 0 comments

---

Tags: [#.net](https://daily.dev/tags/.net), [#redis](https://daily.dev/tags/redis), [#aspnet](https://daily.dev/tags/aspnet)

[View this post on daily.dev](https://daily.dev/posts/new-caching-in-asp-net-core---hybridcache-o1tedvdgx)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"New Caching in ASP.NET Core - HybridCache","url":"https://daily.dev/posts/new-caching-in-asp-net-core---hybridcache-o1tedvdgx","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/new-caching-in-asp-net-core---hybridcache-o1tedvdgx"},"datePublished":"2026-10-04T13:05:52.611Z","dateModified":"2026-10-04T13:13:20.508Z","description":"HybridCache, introduced with .NET 9, combines in-memory (L1) and distributed (L2, e.g. Redis) caching into a unified API, aiming to replace IMemoryCache and...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/7e963cb0fde5c0766f21e12e8d9b4603?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/7e963cb0fde5c0766f21e12e8d9b4603?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"NikolaTech","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"NikolaTech","logo":"https://media.daily.dev/image/upload/s--1h2fO6FL--/f_auto,q_auto/v1791119050/logos/nikolatech?_a=BAMAMicg0","url":"https://daily.dev/sources/nikolatech"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/new-caching-in-asp-net-core---hybridcache-o1tedvdgx","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":".net,redis,aspnet","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"NikolaTech","item":"https://daily.dev/sources/nikolatech"},{"@type":"ListItem","position":3,"name":"New Caching in ASP.NET Core - HybridCache"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/new-caching-in-asp-net-core---hybridcache-o1tedvdgx#faq","mainEntity":[{"@type":"Question","name":"What is HybridCache in .NET 9 and how is it different from IMemoryCache and IDistributedCache?","acceptedAnswer":{"@type":"Answer","text":"HybridCache is a new caching library introduced with .NET 9 that unifies in-memory (L1) and distributed (L2, e.g. Redis) caching behind one API, replacing the separate IMemoryCache and IDistributedCache interfaces. It adds stamped protection against redundant parallel cache requests, customizable serialization, and tag-based bulk invalidation. It also works on .NET 8, .NET Framework 4.7+, and .NET Standard 2.0. daily.dev surfaces practical breakdowns like this for teams evaluating a move to HybridCache."}},{"@type":"Question","name":"How do I invalidate multiple cache entries at once in HybridCache using tags?","acceptedAnswer":{"@type":"Answer","text":"Pass a tags array (e.g. [\"products\"]) to GetOrCreateAsync when storing entries, then call RemoveByTagAsync with that same tag array to invalidate all entries grouped under it in one call, rather than removing keys individually. This bulk invalidation by tag is one of HybridCache's standout features over the older caching interfaces. Developers wiring up cache invalidation strategies can find walkthroughs like this through daily.dev."}},{"@type":"Question","name":"How do I configure HybridCache to use Redis as the distributed cache in ASP.NET Core?","acceptedAnswer":{"@type":"Answer","text":"Add the StackExchangeRedis package, call AddStackExchangeRedisCache with your Redis connection string, then call AddHybridCache afterward. Once the Redis IDistributedCache implementation is registered in the DI container, HybridCache automatically uses it as the L2 secondary cache alongside its serializer. daily.dev helps backend developers track setup details like this when adding Redis to a caching layer."}}]}
```

