Closed DaanGeurts closed 6 years ago
Nice cache! That was indeed a bug. Should be fixed now by: https://github.com/mrsegev/MovieNight/commit/fdd1b28b7e21b94c50e2cd01adf7fb8dc4c8746c
Can you explain me why you are talking to the cache implementation directly and not asking the memoryDataStore for movies and check for and empty response?
First of all, I wanted to say that your tutorial / blog post was a great and inspiring to me to create more maintainable Android code. So a big thank you!
But you say in your blogpost that you can easily switch between caching mechanisms but when I switch the cache for the movierepository to DI.favoritesCache (Room instead of memory) the app won't launch because of accessing the DB on the mainthread. This happens I think of accessing the cache directly in the MovieRepositoryImpl file with
if (!cache.isEmpty())
Do you have any thoughts on this? And again, thank you for this inspiring post and repo!!