79104199

Date: 2024-10-19 04:30:03
Score: 1
Natty:
Report link

In your case,

I want to cache the response so that I can use the app even if it is offline

You need to implement a local database to save data on the user's device. and this is possible using the Room Database. This is how it works:

When Online

When Offline

Please check MVVM News App (retrofit) with local db

Reasons:
  • Whitelisted phrase (-1): In your case
  • RegEx Blacklisted phrase (1): I want
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Milad Mohammadi