iterate

suspend fun iterate(pageSize: Int, action: suspend (List<Record>) -> Boolean)

Iterates over all the records in the cache, in batches of up to pageSize.

Parameters

pageSize

the maximum number of records passed to action at a time.

action

called with each batch of records. Return false to stop iterating, true to keep going. Deleting or otherwise mutating records based on what is seen here is left to the caller.