That’s quite right.
Andy Wang
1

Totally depends on your architecture and needs.

Talking about regular lists of simple data, we are just keeping cache in memory while application is alive.

For example, we have Dagger custom scopes and components which are providing Model layers. These components are stored either in Application, either in lastCustomNonConfigurationInstance of the Activity. Both are surviving rotation. However, lastCustomNonConfigurationInstance will not survive things like Don’t Keep Activities, activity.finish(), and memory reclaim by OS.

So you should decide how long would like to keep the data.

Show your support

Clapping shows how much you appreciated Dmytro Saviuk’s story.