0

I wanna to cache my data which request by Retrofit,but i don't know how to implement it.

As we know read/write cache is time-consumed,and we should not do it in main thread.

Does anybody can tell me how should i do to cache my data with Retrofit?Thanks!

Folyd
  • 1,148
  • 1
  • 16
  • 20

1 Answers1

0

Retrofit itself doesn't cache your data. You can use orm libraries to do it without much work.

Lately I've used Realm, that has a section in their docs specifically for Retrofit.

David Corsalini
  • 7,958
  • 8
  • 41
  • 66