S4 ‐ Caching strategies - S3-G31-Kotlin-QueueHub/mobile-app-android GitHub Wiki
In caching strategies, we implemented these strategies:
-
To start, we use Glide to avoid unnecessary request to download an existing image from internet. That helps the application to have more performance, and avoids using a lot of resources in unnecessary tasks. As you can see in the following images we implemented Glide in this composable to render a Glide Image.
-
Then, is important to have a quick way to get data after downloading that data from internet, by make that we implemented cache structures as ArrayMap, we take into account the initial capacity of that structure to avoid waste of space in main memory. With that we only once for session download the information of all places from internet.
-
And the last caching strategy is implemented by default in Firebase, one tool that we are using, this tool is explained in more detail in local strategies.