Add configurable memory limits and LRU eviction for runtime cache

This commit is contained in:
truewhile
2026-09-13 00:41:04 +08:00
parent 2989649445
commit 386fc358d1
13 changed files with 634 additions and 93 deletions
+8
View File
@@ -99,6 +99,14 @@ export const generalSettingsGroup: SettingGroup = {
hint: 'NAS 建议 1;用于扫描、整理洗版和手动探测,避免同时启动多个 ffprobe 进程',
defaultValue: '1',
},
{
key: 'cache.memory_max_size_mb',
label: '进程内缓存上限 (MB)',
type: 'number',
hint: 'JSON/列表等热缓存共用的内存上限。低配机器建议 32-64,内存充足可用 128-256;保存后会立即裁剪超额缓存,默认 128MB',
defaultValue: '128',
placeholder: '128',
},
{
key: 'cache.images_max_size_mb',
label: '图片缓存上限 (MB)',