What is the difference between response caching and output caching in ASP.NET Core?

ASP.NET Core Performance Advanced 3–5 Yrs5+ Yrs Conceptual 1 min read

Quick Answer

Response caching sets HTTP cache headers (Cache-Control) and honours them via a middleware cache — it relies on the client/proxy respecting the headers, and only caches anonymous GETs with no Set-Cookie. Output caching (.NET 7+) is a server-side cache you fully control — cache by route/query/header, set policies, and evict by tag, independent of client headers.

Response caching is really about HTTP headers — the middleware sets Cache-Control and keeps a small cache, but it depends on the browser or a proxy honouring those headers, and it won't cache anything with a cookie or auth. Output caching, added in .NET 7, is a proper server-side cache that I control in code: I define policies to vary by query string or header, it works with authenticated requests, and crucially I can evict entries by tag. So response caching is for genuinely public content and CDNs, and output caching is for expensive server-side work I want to reuse and be able to invalidate after a write.

Response cachingOutput caching
WhereClient / proxy / small middleware cacheServer (in-memory or Redis)
ControlVia HTTP headersVia policies in code
Works with auth / cookiesNoYes (with a policy)
Manual invalidationNoYes — EvictByTagAsync
Vary by query/headerLimitedFull (VaryByQuery, VaryByHeader)

Use response caching to let browsers and CDNs cache truly public content. Use output caching for expensive server work you want to reuse across users, especially when you need to bust the cache after a write (tag the entry, evict the tag in the write path).