MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / get

Method get

crates/explorer/src/index.js:22–37  ·  view source on GitHub ↗
(key)

Source from the content-addressed store, hash-verified

20 }
21
22 get(key) {
23 let v = this.cache.get(key);
24 if (v !== undefined) {
25 // Remove the found element from the cache so it can be inserted it again
26 // at the end before returning.
27 this.cache.delete(key);
28 } else {
29 v = this.getFunc(key);
30 if (this.cache.size > this.cache.maxSize) {
31 // Evict the oldest item from the cache.
32 this.cache.delete(this.cache.keys().next().value);
33 }
34 }
35 this.cache.set(key, v);
36 return v;
37 }
38}
39
40/*** Colors for Offsets **********************************************************/

Callers 4

rgbForOffsetFunction · 0.45
linkElementsFunction · 0.45
index.jsFile · 0.45

Calls 4

deleteMethod · 0.45
nextMethod · 0.45
keysMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected