add response cache with TTL + Cache-Control parsing

- New cache.rs: FIFO-eviction cache with max_bytes cap
- Cacheable: GET/HEAD only, no-store/no-cache/private/Set-Cookie reject
- TTL from Cache-Control: max-age=, or heuristics by extension (css/js/fonts/images -> 1h)
- Hook in DomainFronter::relay: check cache before network, store after 2xx
- 10 new unit tests (23 total)
This commit is contained in:
therealaleph
2026-04-21 18:18:21 +03:00
parent 00e0d411fc
commit 52d00312ab
3 changed files with 303 additions and 7 deletions
+1
View File
@@ -1,5 +1,6 @@
#![allow(dead_code)]
mod cache;
mod cert_installer;
mod config;
mod domain_fronter;