ResponseCacheLocation Enum

Determines the value for the “Cache-control” header in the response.

Namespace
Microsoft.AspNetCore.Mvc
Assemblies
  • Microsoft.AspNetCore.Mvc.Core

Syntax

public enum ResponseCacheLocation
enum Microsoft.AspNetCore.Mvc.ResponseCacheLocation

Fields

Any()

Cached in both proxies and client. Sets “Cache-control” header to “public”.

Return type:Microsoft.AspNetCore.Mvc.ResponseCacheLocation
Any = 0
Client()

Cached only in the client. Sets “Cache-control” header to “private”.

Return type:Microsoft.AspNetCore.Mvc.ResponseCacheLocation
Client = 1
None()

“Cache-control” and “Pragma” headers are set to “no-cache”.

Return type:Microsoft.AspNetCore.Mvc.ResponseCacheLocation
None = 2