Crate salvo_cache
source ·Expand description
Cache middleware for 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;
Modules
- moka_store
moka-store
memory store module.
Structs
- A constructed via
salvo_cache::Cache::builder()
. - Cached entry which will be stored in the cache store.
- Skipper for
Method
. You can use it to skip some methods. - Identify user by Request Uri.
Enums
CachedBody
is used to save response body toCachedStore
.
Traits
- Issuer
- Store cache.