MCPcopy Index your code
hub / github.com/Acode-Foundation/Acode / setCache

Function setCache

src/utils/codeHighlight.js:37–43  ·  view source on GitHub ↗
(key, value)

Source from the content-addressed store, hash-verified

35}
36
37function setCache(key, value) {
38 if (highlightCache.size >= MAX_CACHE_SIZE) {
39 const firstKey = highlightCache.keys().next().value;
40 highlightCache.delete(firstKey);
41 }
42 highlightCache.set(key, value);
43}
44
45/**
46 * Generates CSS styles for syntax highlighting tokens

Callers 2

highlightLineFunction · 0.85
highlightCodeBlockFunction · 0.85

Calls 2

setMethod · 0.80
deleteMethod · 0.65

Tested by

no test coverage detected