mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
feat: Add clearCache
to NTQQApi
This commit is contained in:
parent
6c267044f0
commit
f08c816286
@ -80,9 +80,9 @@ export enum NTQQApiMethod {
|
||||
CACHE_ADD_SCANNED_PATH = 'nodeIKernelStorageCleanService/addCacheScanedPaths', // TODO: Unused method
|
||||
CACHE_PATH_HOT_UPDATE = 'getHotUpdateCachePath', // TODO: Unused method
|
||||
CACHE_PATH_DESKTOP_TEMP = 'getDesktopTmpPath', // TODO: Unused method
|
||||
CACHE_PATH_SESSION = 'getCleanableAppSessionPathList', // TODO: Unused method
|
||||
CACHE_PATH_SESSION = 'getCleanableAppSessionPathList',
|
||||
CACHE_SCAN = 'nodeIKernelStorageCleanService/scanCache',
|
||||
CACHE_CLEAR = '', // TODO
|
||||
CACHE_CLEAR = 'nodeIKernelStorageCleanService/clearCacheDataByKeys',
|
||||
|
||||
CACHE_CHAT_GET = 'nodeIKernelStorageCleanService/getChatCacheInfo',
|
||||
CACHE_CHAT_CLEAR = 'nodeIKernelStorageCleanService/clearChatCacheInfo',
|
||||
@ -735,6 +735,17 @@ export class NTQQApi {
|
||||
});
|
||||
}
|
||||
|
||||
static clearCache(cacheKeys: Array<string> = [ 'tmp', 'hotUpdate' ]) {
|
||||
console.log(cacheKeys);
|
||||
return callNTQQApi<any>({
|
||||
channel: NTQQApiChannel.IPC_UP_3,
|
||||
methodName: NTQQApiMethod.CACHE_CLEAR,
|
||||
args: [{
|
||||
keys: cacheKeys
|
||||
}, null]
|
||||
});
|
||||
}
|
||||
|
||||
static getChatCacheList(type: 1 | 2, pageSize: number = 80, pageIndex: number = 0) {
|
||||
return new Promise<ChatCacheList>((res, rej) => {
|
||||
callNTQQApi<ChatCacheList>({
|
||||
|
Loading…
x
Reference in New Issue
Block a user