Redis and Cache Management for ASP.NET Core
Learn how to improve ASP.NET Core application performance using MemoryCache, Distributed Cache, and Redis. Apply caching strategies, expiration, invalidation, serialization, and real-world scenarios.

In this course series, we will explore cache management and Redis integration in ASP.NET Core applications through real-world examples. We will start with the differences between in-memory and distributed caching, then work with IMemoryCache, IDistributedCache, and Redis. We will cover cache-aside patterns, expiration strategies, absolute and sliding expiration, cache invalidation, key design, serialization, cache stampede, and stale data problems. We will also examine Redis usage in high-traffic applications, multi-server environments, performance measurement, and choosing the right caching strategy.
What you will learn
Course lessons
- 11. Real-World Project Architecture and Cache Requirements AnalysisBuild a layered ASP.NET Core Web API project with Entity Framework Core, SQL Server, and Redis around a product catalog scenario. Identify slow queries, analyze caching opportunities, and establish baseline performance measurements for later lessons.50 dk
- 22. Caching Fundamentals and the First Implementation with In-Memory CacheLearn cache, hit, miss, TTL, and eviction concepts, then apply the cache-aside pattern to product list and detail endpoints with ASP.NET Core IMemoryCache.40 dk
- 33. Cache Entry Configuration: Absolute and Sliding ExpirationLearn how to configure absolute, sliding, and combined expiration policies, control cache size, and choose suitable TTL values with IMemoryCache.35 dk
- 44. Cache Key Design and Data IsolationDesign safe cache key standards for products, categories, pagination, filters, and user context while preventing collisions, unnecessary growth, and cross-request data leakage.35 dk
- 55. Creating a Cache Abstraction with IDistributedCacheMove cache access behind a shared service using IDistributedCache, implement string and byte operations, configure JSON serialization, and prepare for provider changes.55 dk
- 66. Installing Redis with Docker and Integrating It with ASP.NET CoreIn this lesson, you will run Redis with Docker Compose, add connection settings to an ASP.NET Core application, and configure the Redis provider for IDistributedCache. You will also verify connectivity, test restarts and container lifecycle behavior, and troubleshoot common configuration errors.45 dk
- 77. Redis Data Modeling, Serialization, and an Advanced Cache ServiceLearn how to store product DTOs as JSON in Redis, manage serializer options, nulls, schema versions, payload size, and a reusable typed cache service.40 dk
- 88. Cache Invalidation and Data ConsistencyLearn how to invalidate cache keys during product changes, test stale data scenarios, and choose an appropriate consistency strategy between the database and cache.35 dk
- 99. Hardening the Cache-Aside Flow and Error HandlingBuild a resilient cache-aside service by handling Redis outages, timeouts, cancellation, and database fallback safely.50 dk
- 1010. Solving Stale Data and Cache Stampede ProblemsLearn to solve Redis cache problems with stale-while-revalidate, short TTLs, background refresh, distributed locks, and request coalescing.45 dk
- 1111. Distributed Cache and Shared State in a Multi-Server EnvironmentRun an ASP.NET Core application across multiple containers to compare IMemoryCache with Redis distributed caching, validate cache sharing under load balancing, and examine instance-specific state.60 dk
- 1212. Performance Measurement, Observability, and a Production-Ready Cache StrategyLearn how to measure cache performance, establish Redis and ASP.NET Core observability, and build a sustainable production caching strategy.90 dk