MCPcopy Create free account
hub / github.com/mikro-orm/mikro-orm / get

Method get

packages/core/src/cache/MemoryCacheAdapter.ts:15–27  ·  view source on GitHub ↗

* @inheritDoc

(name: string)

Source from the content-addressed store, hash-verified

13 * @inheritDoc
14 */
15 get<T = any>(name: string): T | undefined {
16 const data = this.#data.get(name);
17
18 if (data) {
19 if (data.expiration < Date.now()) {
20 this.#data.delete(name);
21 } else {
22 return data.data;
23 }
24 }
25
26 return undefined;
27 }
28
29 /**
30 * @inheritDoc

Callers

nothing calls this directly

Calls 2

getMethod · 0.65
deleteMethod · 0.65

Tested by

no test coverage detected