feat: 刷新时 清除所有缓存

This commit is contained in:
xream 2024-03-21 02:37:21 +08:00
parent dc8f19f350
commit 64478c7a27
No known key found for this signature in database
GPG Key ID: 1D2C5225471789F9
2 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{
"name": "sub-store",
"version": "2.14.260",
"version": "2.14.261",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
"main": "src/main.js",
"scripts": {

View File

@ -3,6 +3,8 @@ import { ENV } from '@/vendor/open-api';
import { failed, success } from '@/restful/response';
import { updateArtifactStore, updateAvatar } from '@/restful/settings';
import resourceCache from '@/utils/resource-cache';
import scriptResourceCache from '@/utils/script-resource-cache';
import headersResourceCache from '@/utils/headers-resource-cache';
import {
GIST_BACKUP_FILE_NAME,
GIST_BACKUP_KEY,
@ -73,6 +75,8 @@ async function refresh(_, res) {
// 2. clear resource cache
resourceCache.revokeAll();
scriptResourceCache.revokeAll();
headersResourceCache.revokeAll();
success(res);
}