Skip to content

Commit 780dc15

Browse files
authored
chore: store to s3 after cache miss (#3285)
1 parent 85696e2 commit 780dc15

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

servers/fdr/src/services/docs-cache/DocsDefinitionCache.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ export class DocsDefinitionCacheImpl implements DocsDefinitionCache {
148148

149149
this.app.logger.info(`Cache MISS for ${url}`);
150150
const dbResponse = await this.getDocsForUrlFromDatabase({ url });
151+
await this.app.services.s3.writeLoadDocsForUrlResponse({
152+
domain: url.hostname,
153+
readDocsDefinition: dbResponse.response,
154+
});
151155

152156
// we don't want to cache from READ if we are currently updating the cache via WRITE
153157
if (!this.getDocsWriteMonitor(url.hostname).isLocked()) {

0 commit comments

Comments
 (0)