SnapshotPersistentCache

A persistent cache that saves data by taking a snapshot of the data in the cache at a point in time. All data is read out of the persistent cache at once.

Parameters

T

the type of data to save in the cache.

Functions

Link copied to clipboard
abstract suspend fun read(): T?
Link copied to clipboard
abstract suspend fun save(cachedData: T?)

Saves cachedData to the persistent cache. The data fully overwrites any data already in the cache.