bugfix: 一些bug修复

This commit is contained in:
2026-05-22 17:45:58 +08:00
parent c286db68b1
commit b02f15f735
12 changed files with 115 additions and 304 deletions
+8 -2
View File
@@ -1,9 +1,14 @@
// server/api/cache/clear.post.ts - 清空答题缓存接口
import { setResponseStatus } from "h3";
import { invalidAccessTokenResponse, verifyAccessToken } from "~~/server/utils/auth";
import {
invalidAccessTokenResponse,
verifyAccessToken
} from "~~/server/utils/auth";
import { answerCache } from "~~/server/utils/cache";
import { serverEnv } from "~~/server/utils/env";
import { createApiLogger } from "~~/server/utils/logging";
import { clearQaRecords } from "~~/server/utils/runtimeState";
/**
* 清空内存缓存
@@ -32,8 +37,9 @@ export default defineEventHandler((event) => {
};
}
// 清空当前进程内缓存,不影响问答记录和运行统计中的 uptime
// 清空当前进程内缓存和问答记录,不影响运行统计中的 uptime
answerCache.clear();
clearQaRecords();
logger.info("finish_success");
return {