Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

clearIndexedDbPersistence

Clears the persistent storage. This includes pending writes and cached documents.

Must be called while the Firestore instance is not started (after the app is terminated or when the app is first initialized). On startup, this function must be called before other functions (other than initializeFirestore or {@link (getFirestore:1)})). If the Firestore instance is still running, the promise will be rejected with the error code of failed-precondition.

Note: clearIndexedDbPersistence() is primarily intended to help write reliable tests that use Cloud Firestore. It uses an efficient mechanism for dropping existing data but does not attempt to securely overwrite or otherwise make cached data unrecoverable. For applications that are sensitive to the disclosure of cached data in between user sessions, we strongly recommend not enabling persistence at all.

function clearIndexedDbPersistence(firestore: Firestore): Promise<void>;
§
clearIndexedDbPersistence(firestore: Firestore): Promise<void>
[src]

§Parameters

§
firestore: Firestore
[src]
  • The Firestore instance to clear persistence for.

§Return Type

§
Promise<void>
[src]

A Promise that is resolved when the persistent storage is cleared. Otherwise, the promise is rejected with an error.