0Pricing
C# Academy · Lesson

Output Caching Basics

Cache responses to reduce work.

What Is Output Caching?

Output caching stores the full HTTP response of an endpoint so that repeated requests are served from the cache without re-running the handler. This cuts latency and load dramatically for read-heavy endpoints.

// First call -> handler runs, response stored
// Next calls -> response served from cache

Output Cache vs Response Cache

Built-in output caching (added in .NET 7) stores responses on the server and you fully control it. The older response caching only emits HTTP cache headers and relies on the client or proxies to honor them.

// Output caching: server-side store you control
// Response caching: just Cache-Control headers

All lessons in this course

  1. Rate Limiting Algorithms
  2. Configuring Rate Limiting Middleware
  3. Output Caching Basics
  4. Cache Policies and Invalidation
← Back to C# Academy