C# Class Flatwhite.WebApi.CacheMessageHandler

This is a custom WebApi message handler which try to build the response if cache data is available This should create a response asap if there is the cache without waiting for the OutputCacheAttribute to do that which is quite late and quite heavy "if your controller has too many dependencies". People should try to not having heavy Controller anyway.
Inheritance: System.Net.Http.DelegatingHandler
Afficher le fichier Open project: vanthoainguyen/Flatwhite

Méthodes publiques

Méthode Description
CacheMessageHandler ( ICachControlHeaderHandlerProvider handlerProvider ) : System

Initializes an instance of CacheMessageHandler from a provided ICachControlHeaderHandlerProvider

Méthodes protégées

Méthode Description
SendAsync ( HttpRequestMessage request, CancellationToken cancellationToken ) : Task

Process the request and attempt to build the response from cache If it failed, it simply logs the error and continue the pipeline

Method Details

CacheMessageHandler() public méthode

Initializes an instance of CacheMessageHandler from a provided ICachControlHeaderHandlerProvider
public CacheMessageHandler ( ICachControlHeaderHandlerProvider handlerProvider ) : System
handlerProvider ICachControlHeaderHandlerProvider
Résultat System

SendAsync() protected méthode

Process the request and attempt to build the response from cache If it failed, it simply logs the error and continue the pipeline
protected SendAsync ( HttpRequestMessage request, CancellationToken cancellationToken ) : Task
request System.Net.Http.HttpRequestMessage
cancellationToken System.Threading.CancellationToken
Résultat Task