Increase nip05 cache to 3000, link previews to 1000

This commit is contained in:
Alex Gleason 2024-09-20 13:13:26 -05:00
parent efb37701f0
commit 099fec6e31
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
2 changed files with 2 additions and 2 deletions

View file

@ -44,7 +44,7 @@ const nip05Cache = new SimpleLRU<string, nip19.ProfilePointer>(
throw e;
}
},
{ max: 500, ttl: Time.hours(1), gauge: cachedNip05sSizeGauge },
{ max: 3000, ttl: Time.hours(1), gauge: cachedNip05sSizeGauge },
);
async function localNip05Lookup(store: NStore, localpart: string): Promise<nip19.ProfilePointer | undefined> {

View file

@ -57,7 +57,7 @@ async function unfurlCard(url: string, signal: AbortSignal): Promise<PreviewCard
/** TTL cache for preview cards. */
const previewCardCache = new TTLCache<string, Promise<PreviewCard | null>>({
ttl: Time.hours(12),
max: 500,
max: 1000,
});
/** Unfurl card from cache if available, otherwise fetch it. */