MCPcopy Create free account
hub / github.com/mempool/mempool / get

Method get

backend/src/api/memory-cache.ts:25–31  ·  view source on GitHub ↗
(type: string, id: string)

Source from the content-addressed store, hash-verified

23 }
24
25 public get<T>(type: string, id: string): T | null {
26 const found = this.cache.find((cache) => cache.type === type && cache.id === id);
27 if (found) {
28 return found.data;
29 }
30 return null;
31 }
32
33 private cleanup() {
34 this.cache = this.cache.filter((cache) => cache.expires > (new Date()));

Callers 15

httpsRequestFunction · 0.80
downloadFileFunction · 0.80
appFunction · 0.80
appFunction · 0.80
callRuntimeCallbacksFunction · 0.80
ngOnInitMethod · 0.80
ngOnInitMethod · 0.80
ngOnInitMethod · 0.80
ngOnInitMethod · 0.80
ngOnInitMethod · 0.80
transformInputMethod · 0.80
ngOnInitMethod · 0.80

Calls 1

findMethod · 0.80

Tested by 1

mempoolFromArrayBufferFunction · 0.64