MCPcopy Create free account
hub / github.com/Monogatari/Monogatari / imageClearCache

Function imageClearCache

src/engine/assets.ts:90–100  ·  view source on GitHub ↗
(engine: VisualNovelEngine, pattern?: string)

Source from the content-addressed store, hash-verified

88}
89
90export function imageClearCache(engine: VisualNovelEngine, pattern?: string): void {
91 if (!pattern) {
92 engine._imageCache.clear();
93 } else {
94 for (const key of engine._imageCache.keys()) {
95 if (key.startsWith(pattern)) {
96 engine._imageCache.delete(key);
97 }
98 }
99 }
100}
101
102// ============================================================================
103// Combined Cache

Callers

nothing calls this directly

Calls 2

clearMethod · 0.65
keysMethod · 0.65

Tested by

no test coverage detected