Cache all the things

This commit is contained in:
2023-09-05 14:57:50 +01:00
parent 5521f685fc
commit b1459d0f49
49 changed files with 805 additions and 243 deletions

View File

@ -1,8 +1,8 @@
import Dexie, { Table } from "dexie";
import { HexKey, NostrEvent, u256 } from "@snort/system";
import { HexKey, NostrEvent, TaggedNostrEvent, u256 } from "@snort/system";
export const NAME = "snortDB";
export const VERSION = 13;
export const VERSION = 14;
export interface SubCache {
id: string;
@ -41,6 +41,7 @@ const STORES = {
payments: "++url",
gifts: "++id",
notifications: "++id",
followsFeed: "++id, created_at, kind"
};
export class SnortDB extends Dexie {
@ -50,6 +51,7 @@ export class SnortDB extends Dexie {
payments!: Table<Payment>;
gifts!: Table<UnwrappedGift>;
notifications!: Table<NostrEvent>;
followsFeed!: Table<TaggedNostrEvent>;
constructor() {
super(NAME);