teller / com.levibostian.teller.repository / LocalRepository / newCache

newCache

@Synchronized fun newCache(cache: CACHE, requirements: GET_CACHE_REQUIREMENTS): Unit

Save new cache data.

It is up to you to call newCache when you have new cache data to save. A good place to do this is in a ViewModel.

This function will call saveCache for you on a background thread.

This function will trigger a save to a background thread. To be notified on the new cache data, use observe to observe the state of data after it has been updated.