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

requirements

var requirements: GET_CACHE_REQUIREMENTS?

Requirements needed to be able to load cache from the device and to fetch new cache from the network.

When this property is set, the OnlineRepository instance will begin to observe the cache by loading the cache from the device and checking if it needs to fetch fresh cache from the network. All of the work will be done for you.

If the user decides to scroll to the bottom of a list, view a different user profile, or any other reason you need to change to observe a different piece of cache, just set requirements again.

If requirements is set to null, we will stop observing the cache changes and reset the state of cache to none.

Exceptions

RuntimeException - If calling after calling dispose.