MCPcopy Create free account
hub / github.com/arktypeio/arktype / cacheOf

Function cacheOf

ark/aot/driver.ts:825–835  ·  view source on GitHub ↗
({ precompiler }: TrackedPrecompiler)

Source from the content-addressed store, hash-verified

823const cachesByCwd: Record<string, AnswerCache | null> = {}
824
825const cacheOf = ({ precompiler }: TrackedPrecompiler) => {
826 const cwd = precompiler.graph.cwd!
827 if (!(cwd in cachesByCwd)) {
828 try {
829 cachesByCwd[cwd] = new AnswerCache(cwd)
830 } catch {
831 cachesByCwd[cwd] = null
832 }
833 }
834 return cachesByCwd[cwd] ?? undefined
835}
836
837// an answer stored for what a key names whose snapshot still holds
838const cachedAnswerOf = (

Callers 2

answerFunction · 0.70
precompileFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected