Table of Contents

WithCacheableHeaders Method

Definition

Namespace
Cuemon.Extensions.AspNetCore.Mvc
Assemblies
Cuemon.Extensions.AspNetCore.Mvc.dll
Source
src/Cuemon.Extensions.AspNetCore.Mvc/CacheableObjectResultExtensions.cs

WithCacheableHeaders<T>(T, Action<CacheableObjectResultOptions<T>>)

Encapsulates the specified instance within a timestamp and integrity based object that is processed by both HTTP Last-Modified and HTTP ETag filters implementation.

public static ICacheableObjectResult WithCacheableHeaders<T>(this T instance, Action<CacheableObjectResultOptions<T>> setup)

Parameters

instance T

The instance to make cacheable.

setup Action<CacheableObjectResultOptions<T>>

The CacheableObjectResultOptions<T> that needs to be configured.

Returns

ICacheableObjectResult

An ICacheableObjectResult implementation.

Type Parameters

T

The type of the object to make cacheable.

See Also
CacheableObjectResult<T>