jeudi 22 octobre 2015

SharedPreference or Sqlite Caching and Network Caching Confusion

After going the storage options in android and libraries like robospice and picasso, i am a bit stuck here or say confused.

  • For persistent data, i can go with sharedPreference for primitive data types or Sqlite for relational data, and this will be removed by android OS when app is uninstalled.
  • For caching Picasso use HttpClient cache.
  • For Networking or say for Rest call, library like RoboSpice uses Cache.

I have recently implemented and used all of them in my android application, and i also understand the concept of sharedPreference and Sqlite.

But, when it comes to RoboSpice, i am a bit confused as it caches the data but again when an app is killed and again started, it again hits the server for the same data rather than using it from the cache.

Same case with Picasso.

How exactly caching of Robospice and Picasso is different than sharedPreference and Sqlite?

Where their cached data is stored? If not in some file, say in device main memory then they arent used again when app restarts.

Any help or guideline on this topic will be appreciated.

Aucun commentaire:

Enregistrer un commentaire