Search code examples
firebasefirebase-tools

Firebase local emulator suite | how to disable cache


On retrieving a doc from Firestore and manually deleting it on the Firebase Emulator console. The data doesnt get deleted on the client side..

I have to manually clear data site with chrome dev tools enter image description here

I tried disabling cache from chrome but that doesn't work enter image description here


Solution

  • If you are using Angular..

    On your app.module.ts

    Remove enableIndexedDbPersistence(firestore)

    provideFirestore(() => {
      if (environment.useEmulators) {
        const firestore = getFirestore();
        connectFirestoreEmulator(firestore, 'localhost', 8080);
        // enableIndexedDbPersistence(firestore);  <=============== Remove this line
        return firestore;
      } else return getFirestore();
    }),