mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
Increase nip05 cache to 3000, link previews to 1000
This commit is contained in:
parent
efb37701f0
commit
099fec6e31
2 changed files with 2 additions and 2 deletions
|
|
@ -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> {
|
||||
|
|
|
|||
|
|
@ -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. */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue