feat(admin): add cache purge controls to settings

Add `purgeMetadataCache` and `purgeImageCache` procedures that let admins free disk space on demand. Metadata purge removes un-enriched stub titles not in any user's library plus orphaned person records; image purge deletes all cached TMDB files from disk.

Expose both as POST endpoints under `/admin/cache/` via the oRPC contract, implement the core logic in a new `@sofa/core/cache` module, and surface them in a new "Danger Zone" section on the Settings page with individual confirmation dialogs and a combined "Purge all" action.
This commit is contained in:
2026-03-15 10:37:35 -04:00
parent 33fd871114
commit 297eb6b550
12 changed files with 544 additions and 7 deletions
+2
View File
@@ -6,7 +6,9 @@ export {
gte,
inArray,
isNotNull,
isNull,
lt,
notInArray,
or,
sql,
} from "drizzle-orm";