MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / put

Function put

lib/cache/base.ts:95–101  ·  view source on GitHub ↗
(key: string, value: any, creator?: string)

Source from the content-addressed store, hash-verified

93 }
94
95 async put(key: string, value: any, creator?: string): Promise<void> {
96 if (!(value instanceof Buffer)) value = Buffer.from(value);
97 this.puts++;
98 logger.debug(`Cache ${this.cacheName}: put ${key}`);
99 if (this.countersEnabled) PutCounter.inc({type: this.type, name: this.cacheName});
100 return this.putInternal(key, value, creator);
101 }
102
103 abstract getInternal(key: string): Promise<GetResult>;
104

Callers

nothing calls this directly

Calls 1

putInternalMethod · 0.45

Tested by

no test coverage detected