MCPcopy Create free account
hub / github.com/Make-md/makemd / parseCache

Method parseCache

src/adapters/icons/iconsAdapter.ts:24–31  ·  view source on GitHub ↗
(file: AFile, refresh: boolean)

Source from the content-addressed store, hash-verified

22 }
23
24 public async parseCache (file: AFile, refresh: boolean) {
25 const newCache = { svg: `@font-face {
26 font-family: '${file.name}';
27 src: url('${this.middleware.resourcePathForPath(file.path)}');
28 }`}
29 this.cache.set(file.path, newCache);
30 this.middleware.updateFileCache(file.path, this.cache.get(file.path), refresh);
31 }
32
33 public cacheTypes (file: AFile) { return ['svg'] as Array<keyof IconTypeCache>}
34 public contentTypes (file: AFile) { return ['svg'] as Array<keyof IconTypeContent>}

Callers

nothing calls this directly

Calls 4

resourcePathForPathMethod · 0.45
setMethod · 0.45
updateFileCacheMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected