MCPcopy Create free account
hub / github.com/Bistutu/FluentRead / clean

Function clean

entrypoints/utils/cache.ts:70–79  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

68
69 // 清除当前 url.host 的翻译缓存
70 clean() {
71 const keysToDelete = [];
72 // 收集所有要删除的键
73 for (let i = 0; i < localStorage.length; i++) {
74 const key = localStorage.key(i);
75 if (key && key.startsWith(prefix)) keysToDelete.push(key);
76 }
77 // 批量删除
78 keysToDelete.forEach(key => localStorage.removeItem(key));
79 }
80};
81
82// 用于节点序列化

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected