fix: cache preload

feat: Fetch only newest relay list updates
This commit is contained in:
2023-05-25 10:31:47 +01:00
parent 2ccee7bd7c
commit 988416f353
13 changed files with 79 additions and 51 deletions

View File

@ -52,11 +52,14 @@ export function mapEventToProfile(ev: RawEvent) {
}
}
export async function preload() {
await UserCache.preload();
await DmCache.preload();
await InteractionCache.preload();
await UserRelays.preload();
export async function preload(follows?: Array<string>) {
const preloads = [
UserCache.preload(follows),
DmCache.preload(follows),
InteractionCache.preload(follows),
UserRelays.preload(follows),
];
await Promise.all(preloads);
}
export { UserCache, DmCache };