Skip to main content

middleware

Function middleware 

Source
pub async fn middleware<T>(
    __arg0: State<T>,
    request: Request,
    next: Next,
) -> Response
where T: CacheState,
Expand description

The caching middleware is applied to all the routes necessary which can support caching. This only will cache requests on GET HTTP methods to ensure that data modifications are not cached calls