teller-android / com.levibostian.teller.repository / OnlineRepository / refresh

refresh

fun refresh(force: Boolean): Single<RefreshResult>

Manually perform a refresh of the cache.

Ideal in these scenarios:

  1. User indicates in the UI they would like to check for new cache. Example: UIRefreshControl in a UITableView indicating to refresh.
  2. Keep app cache up-to-date at all times through a background job.

Exceptions

IllegalStateException - If requirements have not yet been set for the OnlineRepository. OnlineRepository cannot refresh it it does not know what to refresh.

RuntimeException - If calling after calling dispose.