mirror of
https://github.com/aljazceru/ditto.git
synced 2026-01-27 09:14:20 +01:00
Increase nip05 cache to 3000, link previews to 1000
This commit is contained in:
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user