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

observeCache

protected abstract fun observeCache(requirements: GET_CACHE_REQUIREMENTS): Observable<CACHE>

Get existing cache saved on the device if it exists. If no cache exists, return an empty response set in the Observable and return true in isCacheEmpty. Do not return nil or an Observable with nil as a value as this will cause an exception.

This function is only called after cache has been fetched successfully from fetchFreshCache.

Called on main UI thread.