fix(storage): expire historical inline images with bounded TTL cleanup

- Apply media retention to inline images while preserving text and URLs
- Persist per-workspace cursors atomically with payload updates
- Bound candidate scans and verify event ownership before loading payloads
- Add cleanup indexes and regression tests, and fix Windows path assertions
This commit is contained in:
BiFangKNT
2026-10-18 09:58:04 +08:00
parent cbc849d4e2
commit d610d64c67
14 changed files with 568 additions and 7 deletions
+2 -1
View File
@@ -224,7 +224,8 @@ storage:
max_object_read_bytes: 10485760
# Media content cache (images & attachments externalized from monitoring and pipelines)
media_cache:
# Retention period in days for cached media (defaults to 30 days)
# Retention for CAS files and historical inline images (defaults to 30 days).
# Inline images expire by record creation time; message text is retained.
retention_days: 30
# Maximum disk storage for cached media in MB (0 means unlimited, defaults to 0)
max_size_mb: 0