WithLastModifiedHeader Method
Definition
- Namespace
- Cuemon.Extensions.AspNetCore.Mvc
- Assemblies
- Cuemon.Extensions.AspNetCore.Mvc.dll
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
instanceTThe instance to make cacheable.
setupAction<TimeBasedObjectResultOptions<T>>The TimeBasedObjectResultOptions<T> that needs to be configured.
Returns
- ICacheableObjectResult
An ICacheableObjectResult implementation.
Type Parameters
TThe type of the object to make cacheable.
- See Also
-
CacheableObjectResult<T>