Рет қаралды 16,510
In this video I talk about Retrofit caching and why (in my opinion) you shouldn't use it. Even though I don't think you should use it, I still show you an example of how to set up it and cache http requests.
The reasons you shouldn't use Retrofit caching fall into a couple main categories:
1) It's extremely inefficient (because it uses a key/value pair system)
2) You can't do any kind of custom searching
3) It doesn't follow the single source of truth principal (see my video on the single source of truth principal here: • Single Source of Truth... )
SO WHAT'S THE ALTERNATIVE?
- SQLite and the Room Persistence Library!
➤ Caching course with Room, SQLite, MVVM, Retrofit, Pagination, and much more:
↻ codingwithmitc...
➤ Code for this video:
↻ github.com/mit...