PersistentCacheIndexManager

public final class PersistentCacheIndexManager


Persistent cache indexes can improve performance of local query execution. The PersistentCacheIndexManager controls index creation and lifecycle.

This is not the same as Cloud Firestore Indexes. Persistent cache indexes are optional indexes that only exist within the SDK to assist in local query execution.

To get an instance, call getPersistentCacheIndexManager.

Summary

Public methods

void

Removes all persistent cache indexes.

void

Stops creating persistent cache indexes automatically for local query execution.

void

Enables the SDK to create persistent cache indexes automatically for local query execution when the SDK believes cache indexes can help improves performance.

Public methods

deleteAllIndexes

public void deleteAllIndexes()

Removes all persistent cache indexes. Note this function also deletes indexes generated by setIndexConfiguration, which is deprecated.

disableIndexAutoCreation

public void disableIndexAutoCreation()

Stops creating persistent cache indexes automatically for local query execution. The indexes which have been created by calling enableIndexAutoCreation still take effect.

enableIndexAutoCreation

public void enableIndexAutoCreation()

Enables the SDK to create persistent cache indexes automatically for local query execution when the SDK believes cache indexes can help improves performance.

This feature is disabled by default.