MCPcopy Create free account
hub / github.com/freecodexyz/free-code / constructor

Method constructor

src/utils/fileStateCache.ts:33–39  ·  view source on GitHub ↗
(maxEntries: number, maxSizeBytes: number)

Source from the content-addressed store, hash-verified

31 private cache: LRUCache<string, FileState>
32
33 constructor(maxEntries: number, maxSizeBytes: number) {
34 this.cache = new LRUCache<string, FileState>({
35 max: maxEntries,
36 maxSize: maxSizeBytes,
37 sizeCalculation: value => Math.max(1, Buffer.byteLength(value.content)),
38 })
39 }
40
41 get(key: string): FileState | undefined {
42 return this.cache.get(normalize(key))

Callers

nothing calls this directly

Calls 1

maxMethod · 0.80

Tested by

no test coverage detected