MCPcopy Create free account
hub / github.com/chokcoco/iCSS / cleanup

Method cleanup

website/app/lib/cache.ts:52–59  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50
51 // 清理过期的缓存项
52 cleanup(): void {
53 const now = Date.now();
54 Array.from(this.cache.entries()).forEach(([key, item]) => {
55 if (now - item.timestamp > item.ttl) {
56 this.cache.delete(key);
57 }
58 });
59 }
60}
61
62export const cache = Cache.getInstance();

Callers 1

cache.tsFile · 0.45

Calls 1

deleteMethod · 0.80

Tested by

no test coverage detected