Skip to main content

Crate axum_cache_fred

Crate axum_cache_fred 

Source
Expand description

The tower-cache-fred middleware is intended to be a route-layer middleware that can cache responses for specific routes such as in a RESTful API.

This should not be used to cache routes which require a user-scope or data associated with a cookie/session associated with the request.

Modules§

strategy
Different strategies for generating cache keys

Traits§

CacheState
Simple trait which the axum::extract::State should implement for using the middleware for cache retrieval

Functions§

middleware
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