mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-04-26 14:27:22 +08:00
feat: 增加查询缓存以加速访问
This commit is contained in:
@@ -350,7 +350,9 @@ export function deleteSession(sessionId: string): boolean {
|
||||
if (fs.existsSync(shmPath)) {
|
||||
fs.unlinkSync(shmPath)
|
||||
}
|
||||
deleteSessionCache(sessionId, getCacheDir())
|
||||
const cacheDir = getCacheDir()
|
||||
deleteSessionCache(sessionId, cacheDir)
|
||||
deleteSessionCache(sessionId, path.join(cacheDir, 'query'))
|
||||
return true
|
||||
} catch (error) {
|
||||
console.error('[Database] Failed to delete session:', error)
|
||||
|
||||
Reference in New Issue
Block a user