diff --git a/packages/shared/src/feed-cache.ts b/packages/shared/src/feed-cache.ts index 43e57fcd..710f7e8e 100644 --- a/packages/shared/src/feed-cache.ts +++ b/packages/shared/src/feed-cache.ts @@ -42,8 +42,11 @@ export abstract class FeedCache { } async preload() { - const keys = (await this.table?.toCollection().primaryKeys()) ?? []; - this.onTable = new Set(keys.map(a => a as string)); + // assume already preloaded if keys exist on table in memory + if (this.onTable.size === 0) { + const keys = (await this.table?.toCollection().primaryKeys()) ?? []; + this.onTable = new Set(keys.map(a => a as string)); + } } keysOnTable() {