Paging with Caching Library
This library will help you to add caching in your paging list
Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Add the dependency
dependencies {
implementation 'com.github.MrSwimmer:Pwc:1.1'
}
Data class that is necessary for a UI to show a listing and interact w/ the rest of the system
Data class that is necessary for control network state
A helper class for BoundaryCallback and DataSource to help with tracking network requests. It is designed to support 3 types of requests: INITIAL, BEFORE and AFTER. And runs only 1 request for each of them via runIfNotRunning(RequestType, Request). It tracks a Status and an error for each RequestType.
Check package 'sample' of this repository
Check this post on Habr.com