Table of Contents

WithLastModifiedHeader Method

Definition

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

WithLastModifiedHeader<T>(T, Action<TimeBasedObjectResultOptions<T>>)

Encapsulates the specified instance within a timestamp based object that is processed by a Last-Modified filter implementation.

public static ICacheableObjectResult WithLastModifiedHeader<T>(this T instance, Action<TimeBasedObjectResultOptions<T>> setup)

Parameters

instance T

The instance to make cacheable.

setup Action<TimeBasedObjectResultOptions<T>>

The TimeBasedObjectResultOptions<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>