Kotlin

Room Cache – Simple Offline Caching With NetworkBoundResource + Kotlin Coroutines (Flow) #4



In this part, we will implement the caching strategy and the repository that mediates between the database and the remote data source.

Source code for this part:

Get the MVVM Caching Course:

Take a look at the MVVM Caching Course source code:

____________________
⭐ Get my new MVVM Caching Course…

Similar Posts

27 thoughts on “Room Cache – Simple Offline Caching With NetworkBoundResource + Kotlin Coroutines (Flow) #4
  1. hey buddy – I followed this tutorial along with you, but it is calling network all the time ideally it should not first it should check on cache and then call from server. please correct me if I'm wrong. & many thanks for such a nice tutorials.

  2. Loved your tutorials as always. But I have a doubt I have seen some people use coroutine from dispatcher and some lifecycleScope.launch. what is the difference ? Also which one is better. Thanks

  3. This video just save my day. Really, thank you, thank you, thank you. Can I have a question? How can I populate the database withou using recyclerView. I need to use insert functions when the first activity is started (in onCreate method). Thank you.

  4. Thank you for another great tutorial!
    The next big challenge, at least for me, would be to create the DB on the cloud + the server with Api.
    That would make us masters of the whole process. I've learned from you how to use firestore before,
    but at some point we might have to learn to do at least part of it ourselves.
    I would be grateful to read your opinion about it. At least in titles: what platforms and libraries would you use to do that?
    (let's say for a DB similar to that you've used in this tutorials).

  5. bro first of all thanks a lot for all your videos. i have a question about mobile development. now i am learning the basics of android studio using java like recyclerview and bottombar activity etc
    . thanks to your channel. but i want to learn how to build social apps that connect user. many programmers say i should use firebase but it is expensive for me and i do not want the free version of it. could you please explain to me what skills i need and for what i need them.

  6. Floriaon, as always this is a very high quality tutorial, thank you very much.
    Since I am a student, I cannot take the paid courses now, but when I earn money in the future, I will take all the courses with my eyes off.
    And thank you once again for sharing the github code for even paid content.

  7. Bro, Can you please help me. In my project Json data is not showing in recyclerview. It was working perfectly earlier but from some days nothing is showing. I didn't changes anything in my project. If you have time can you please take a look. I am sending it on your email.

  8. @Coding in Flow does it blink when refetching the data because we are observing the restaurant table and when updating the table we delete all and then insert the new restaurants? Or is it something else? And how would you mitigate that effect? In this example it looks like data being fetched is new but let's say on the second fetch you had a few less restaurants and maybe a couple of them changed their addresses. How would you efficiently update the Room table so that you don't have to delete the whole thing and insert all again — or is this best practice? Basically I'm looking for the equivalent to a DiffUtil for Room I believe.

Leave a Reply

Your email address will not be published. Required fields are marked *