Table of Contents

Class ResponseCacheAttribute

Namespace
Phoesion.Glow.SDK.Firefly
Assembly
Phoesion.Glow.SDK.Firefly.dll

Specifies the parameters necessary for setting appropriate headers in response caching.

[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public class ResponseCacheAttribute : Attribute, IActionFilter
Inheritance
object
Attribute
ResponseCacheAttribute
Implements

Properties

Duration

Gets or sets the duration in seconds for which the response is cached. This sets "max-age" in "Cache-control" header.

public int Duration { get; set; }

Property Value

int

Location

Gets or sets the location where the data from a particular URL must be cached.

public ResponseCacheLocation Location { get; set; }

Property Value

ResponseCacheLocation

NoStore

Gets or sets the value which determines whether the data should be stored or not. When set to true, it sets "Cache-control" header to "no-store". Ignores the "Location" parameter for values other than "None". Ignores the "duration" parameter.

public bool NoStore { get; set; }

Property Value

bool

VaryByHeader

Gets or sets the value for the Vary response header.

public string? VaryByHeader { get; set; }

Property Value

string

VaryByQueryKeys

Gets or sets the query keys to vary by.

public string[]? VaryByQueryKeys { get; set; }

Property Value

string[]

Remarks

VaryByQueryKeys requires the response cache middleware.

Methods

InvokeAsync(IActionFilterChain, IActionFilterContext)

public ValueTask<object?> InvokeAsync(IActionFilterChain chain, IActionFilterContext context)

Parameters

chain IActionFilterChain
context IActionFilterContext

Returns

ValueTask<object>