perf: remove HTTP cache middleware, add service-level ETags

- Delete cache.rs middleware that buffered entire response bodies (up to 10MB)
  in RAM on every cache miss, defeating streaming and causing memory spikes
- Also buffered non-GET responses unnecessarily via response_map_body()
- Add lightweight ETag support (based on max modified_at + count) to:
  - FolderHandler::list_folder_listing (combined folder+files endpoint)
  - FileHandler::list_files_query (file listing endpoint)
- Both support If-None-Match / 304 Not Modified without any body buffering
- File downloads already had ETag/304 support at handler level
- Service-level caches (FileContentCache, SearchService, ThumbnailService)
  remain unchanged — they handle caching without HTTP body materialization
This commit is contained in:
Dionisio
2026-02-24 09:52:22 +01:00
parent 677b3eafa9
commit cba34056dc
4 changed files with 68 additions and 500 deletions
-1
View File
@@ -1,3 +1,2 @@
pub mod auth;
pub mod cache;
pub mod redirect; // Add redirect middleware for API to Axum transition