Crate salvo_cache

Crate salvo_cache 

Source
Expand description

Cache middleware for the Salvo web framework.

Cache middleware for Salvo designed to intercept responses and cache them. This middleware will cache the response’s StatusCode, Headers, and Body.

You can define your custom CacheIssuer to determine which responses should be cached, or you can use the default RequestIssuer.

The default cache store is MokaStore, which is a wrapper of moka. You can define your own cache store by implementing CacheStore.

Example: cache-simple Read more: https://salvo.rs

Re-exports§

pub use moka_store::MokaStore;moka-store

Modules§

moka_storemoka-store
Memory store module.

Structs§

Cache
Cache middleware.
CachedEntry
Cached entry which will be stored in the cache store.
MethodSkipper
Skipper for Method. You can use it to skip some methods.
RequestIssuer
Identify user by Request Uri.

Enums§

CachedBody
CachedBody is used to save the response body to CacheStore.

Traits§

CacheIssuer
Issuer
CacheStore
Store cache.