KestrunResponse.RevalidateCache method
Attempts to revalidate the cache based on ETag and Last-Modified headers. If the resource is unchanged, sets the response status to 304 Not Modified. Returns true if a 304 response was written, false otherwise.
public bool RevalidateCache(object? payload, string? etag = null, bool weakETag = false,
DateTimeOffset? lastModified = default)
| parameter | description |
|---|---|
| payload | The payload to validate. |
| etag | The ETag header value. |
| weakETag | Indicates if the ETag is a weak ETag. |
| lastModified | The Last-Modified header value. |
Return Value
True if a 304 response was written, false otherwise.
See Also
- class KestrunResponse
- namespace Kestrun.Models