opt: cache clean

This commit is contained in:
My-Responsitories
2026-06-05 01:54:15 +08:00
parent 68cf91274f
commit 2df1277fca
7 changed files with 18 additions and 47 deletions

View File

@@ -595,19 +595,10 @@ List<SettingsModel> get extraSettings => [
onTap: _showProxyDialog,
),
),
const SwitchModel(
title: '自动清除缓存',
subtitle: '每次启动时清除缓存',
leading: Icon(Icons.auto_delete_outlined),
setKey: SettingBoxKey.autoClearCache,
defaultVal: false,
),
NormalModel(
title: '最大缓存大小',
getSubtitle: () {
final num = Pref.maxCacheSize;
return '当前最大缓存大小: 「${num == 0 ? '无限' : CacheManager.formatSize(Pref.maxCacheSize)}';
},
getSubtitle: () =>
'当前最大缓存大小: 「${CacheManager.formatSize(Pref.maxCacheSize)}',
leading: const Icon(Icons.delete_outlined),
onTap: _showCacheDialog,
),