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

Method putInternal

lib/cache/s3.ts:74–84  ·  view source on GitHub ↗
(key: string, value: Buffer, creator?: string)

Source from the content-addressed store, hash-verified

72 }
73
74 override async putInternal(key: string, value: Buffer, creator?: string): Promise<void> {
75 const options: S3HandlerOptions = {
76 metadata: creator ? {CreatedBy: creator} : {},
77 redundancy: StorageClass.REDUCED_REDUNDANCY,
78 };
79 try {
80 await this.s3.put(key, value, this.path, options);
81 } catch (e) {
82 this.onError(e, 'write');
83 }
84 }
85
86 async putWithTTL(key: string, value: Buffer, ttlDays: number, creator?: string): Promise<void> {
87 const expiresDate = new Date(Date.now() + ttlDays * 24 * 60 * 60 * 1000);

Callers 1

putFunction · 0.45

Calls 1

putMethod · 0.65

Tested by

no test coverage detected