PersistentCacheIndexManager

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 functions

Unit

Removes all persistent cache indexes.

Unit

Stops creating persistent cache indexes automatically for local query execution.

Unit

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

Public functions

deleteAllIndexes

fun deleteAllIndexes(): Unit

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

disableIndexAutoCreation

fun disableIndexAutoCreation(): Unit

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

enableIndexAutoCreation

fun enableIndexAutoCreation(): Unit

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.