Allows you to define custom logic to determine whether your local data is still valid or if it needs to be refreshed from the remote source using the Fetcher.
Store<Int, Post>
, the Output
is Post
.Data Retrieval Request
Validation Check
isValid
method is called with the cached data as the parameter.Data Update
Validator.by
factory method:
isValid
function should execute quickly to avoid slowing down data retrieval. Complex computations or I/O operations should be avoided.