Over the past days I have been getting comfortable with Android Architecture Components and I've been mostly interested in the Paging Library for handling and displaying lists of data from a remote source. For the best UX it is better to load data first into the database, in this case Room then display it in a recyclerview using the pagingLibrary and adapters. My concern is this, lets say an api has 1000s of records or a twitter feed even and all this data has to pass through the db then to the UI, how to handle this storage on the device? Seeing as storing all the data on the device is a bad idea. Is there a way to remove 'stale' data or what is the recommended way of doing this?
Edit: The android team has been working on V3 for the paging library here is a link to an article that might shed more light article here