mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-08 04:54:32 +00:00
await cache update to avoid hammering redis in UrlPreviewService.ts
This commit is contained in:
parent
a1fcf554fa
commit
23267a3a96
1 changed files with 2 additions and 1 deletions
|
@ -172,7 +172,8 @@ export class UrlPreviewService {
|
|||
await this.inferActivityPubLink(summary);
|
||||
}
|
||||
|
||||
this.previewCache.set(cacheKey, summary);
|
||||
// Await this to avoid hammering redis when a bunch of URLs are fetched at once
|
||||
await this.previewCache.set(cacheKey, summary);
|
||||
|
||||
// Cache 1 day (matching redis)
|
||||
reply.header('Cache-Control', 'public, max-age=86400');
|
||||
|
|
Loading…
Add table
Reference in a new issue