firestash
v5.0.5
Published
FireStash is a way to easily maintain an aggressive local cache of FireStore collections to reduce read costs and simplify data sync logic.
Downloads
1,561
Readme
FireStash
FireStash is a way to easily maintain an aggressive local cache of FireStore collections to reduce read costs and simplify data sync logic.
FireStash.get<Obj = object>(collection: string, documentId: string | string[]): Promise<Obj>;
FireStash.update(collection: string, documentId: string, object?: Json): Promise<void>;
FireStash.delete(collection: string, documentId: string): Promise<void>;
FireStash.watch(collection: string): Promise<() => void>;
FireStash.unwatch(collection: string): Promise<void>;
FireStash.stop(): Promise<void>;
FireStash.bust(collection: string, documentId?: string): Promise<void>;
FireStash.ensure(collection: string, documentId?: string): Promise<void>;
FireStash.purge(collection: string): Promise<void>;
FireStash.stash(collection: string): Promise<Record<string, number>>;
FireStash.cacheKey(collection: string, page: number): string;