87 releases (36 breaking)

new 0.74.1 Nov 5, 2024
0.73.0 Oct 1, 2024
0.68.5 Jul 9, 2024
0.66.2 Mar 6, 2024
0.37.6 Nov 29, 2022

#50 in #server-framework

Download history 487/week @ 2024-07-16 654/week @ 2024-07-23 640/week @ 2024-07-30 634/week @ 2024-08-06 961/week @ 2024-08-13 615/week @ 2024-08-20 549/week @ 2024-08-27 507/week @ 2024-09-03 767/week @ 2024-09-10 894/week @ 2024-09-17 819/week @ 2024-09-24 633/week @ 2024-10-01 420/week @ 2024-10-08 1134/week @ 2024-10-15 10735/week @ 2024-10-22 15862/week @ 2024-10-29

28,208 downloads per month
Used in salvo

MIT/Apache

700KB
16K SLoC

salvo-cache

Cache middleware for Salvo.

This is an official crate, so you can enable it in Cargo.toml like this:

salvo = { version = "*", features = ["cache"] }

Docs


lib.rs:

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

Dependencies

~17–32MB
~575K SLoC