MCPcopy
hub / github.com/SPlayer-Dev/SPlayer / getSize

Method getSize

electron/main/database/CacheDB.ts:100–105  ·  view source on GitHub ↗

获取某类缓存总大小

(type: string)

Source from the content-addressed store, hash-verified

98
99 /** 获取某类缓存总大小 */
100 getSize(type: string): number {
101 const result = this.db
102 .prepare("SELECT SUM(size) as total FROM kv_cache WHERE type = ?")
103 .get(type) as { total: number };
104 return result.total || 0;
105 }
106
107 /** 获取所有缓存总大小 */
108 getTotalSize(): number {

Callers 1

initCacheIpcFunction · 0.45

Calls 2

getMethod · 0.65
prepareMethod · 0.65

Tested by

no test coverage detected