Skip to main content

How to disable response caching in ASP.NET Core.

[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public IActionResult HelloWorld()
{
    return View();
}