Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backporting documentation changes #550

Merged
merged 1 commit into from
Jun 21, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -376,21 +376,22 @@ public static void setLoggingEnabled(boolean loggingEnabled) {
}

/**
* Clears the persistent storage. This includes pending writes and cached documents.
* Clears the persistent storage, including pending writes and cached documents.
*
* <p>Must be called while the firestore instance is not started (after the app is shutdown or
* when the app is first initialized). On startup, this method must be called before other methods
* (other than setFirestoreSettings()). If the firestore instance is still running, the Task will
* fail with an error code of FAILED_PRECONDITION.
* <p>Must be called while the FirebaseFirestore instance is not started (after the app is
* shutdown or when the app is first initialized). On startup, this method must be called before
* other methods (other than <code>setFirestoreSettings()</code>). If the FirebaseFirestore
* instance is still running, the <code>Task</code> will fail with an error code of
* <code>FAILED_PRECONDITION</code>.
*
* <p>Note: clearPersistence() is primarily intended to help write reliable tests that use
* Firestore. It uses the most efficient mechanism possible for dropping existing data but does
* <p>Note: <code>clearPersistence()</code> 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 cache data in between user sessions we strongly
* recommend not to enable persistence in the first place.
* that are sensitive to the disclosure of cached data in between user sessions, we strongly
* recommend not enabling persistence at all.
*
* @return A Task that is resolved once the persistent storage has been cleared. Otherwise, the
* Task is rejected with an error.
* @return A <code>Task</code> that is resolved when the persistent storage is cleared. Otherwise,
* the <code>Task</code> is rejected with an error.
*/
@PublicApi
public Task<Void> clearPersistence() {
Expand Down