feat(cache): add pingora-cache integration with per-route config

Add in-memory HTTP response cache using pingora-cache MemCache backend.
Cache runs after the detection pipeline so cache hits bypass upstream
request modifications and body rewriting. Respects Cache-Control
(no-store, private, s-maxage, max-age), skips caching for routes with
body rewrites or auth subrequest headers, and supports configurable
default TTL, stale-while-revalidate, and max file size per route.

Signed-off-by: Sienna Meridian Satterwhite <sienna@sunbeam.pt>
This commit is contained in:
2026-03-10 23:38:20 +00:00
parent 76ad9e93e5
commit 0f31c7645c
11 changed files with 249 additions and 3 deletions

View File

@@ -50,6 +50,7 @@ fn make_detector() -> ScannerDetector {
rewrites: vec![],
body_rewrites: vec![],
response_headers: vec![],
cache: None,
},
RouteConfig {
host_prefix: "src".into(),
@@ -62,6 +63,7 @@ fn make_detector() -> ScannerDetector {
rewrites: vec![],
body_rewrites: vec![],
response_headers: vec![],
cache: None,
},
RouteConfig {
host_prefix: "docs".into(),
@@ -74,6 +76,7 @@ fn make_detector() -> ScannerDetector {
rewrites: vec![],
body_rewrites: vec![],
response_headers: vec![],
cache: None,
},
];