#http #async #web #framework #server

salvo-cache

Cache middleware for Salvo web server framework

16 releases (5 breaking)

new 0.42.0 May 29, 2023
0.41.1 May 12, 2023
0.40.0 Apr 30, 2023
0.39.1 Apr 28, 2023
0.0.1 Oct 3, 2022

#10 in #salvo

Download history 447/week @ 2023-02-05 368/week @ 2023-02-12 383/week @ 2023-02-19 201/week @ 2023-02-26 166/week @ 2023-03-05 163/week @ 2023-03-12 167/week @ 2023-03-19 175/week @ 2023-03-26 171/week @ 2023-04-02 148/week @ 2023-04-09 183/week @ 2023-04-16 157/week @ 2023-04-23 207/week @ 2023-04-30 283/week @ 2023-05-07 221/week @ 2023-05-14 209/week @ 2023-05-21

949 downloads per month
Used in salvo

MIT/Apache

520KB
12K SLoC

salvo-cache

Cache middleware for Savlo.

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

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

Docs


lib.rs:

Cache middleware for Salvo.

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 [MemoryStore], which is a wrapper of [moka]. You can define your own cache store by implementing [CacheStore].

Example: cache-simple

Dependencies

~15–24MB
~510K SLoC