Overview

edit

Meziantou.AspNetCore has two independent features:

  • Default no-cache header: UseNoCache marks every response that does not set Cache-Control as non-cacheable, so browsers and proxies never keep a stale copy of a page or an API response.
  • Middleware pipeline debugging: see the middleware of the application, in order, with their branches, and the list of endpoints, from code or from a debug endpoint.
dotnet package add Meziantou.AspNetCore

UseNoCache is in the Meziantou.AspNetCore namespace; the debugging types are in Meziantou.AspNetCore.Diagnostics.

The service defaults already add the no-cache middleware: you don't need to call UseNoCache in an application that uses them.