Skip to content

universe/firestash

Repository files navigation

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;

About

Firestore wrapper with intelligent local cache.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •