1

I'm using Koush's terrific image loading library, Ion, but I want to be able to persist images on disk across application launches. This is to avoid reloading images from the network when the app exits and restarts. Currently, it appears the cache is wiped when Ion is initialized and doesn't reuse an existing disk cache. Does Ion support this caching mode and if so how can I configure it? Thanks.

Jackpile
  • 1,075
  • 9
  • 18

1 Answers1

1

Ion automatically caches GET requests.

There is not direct public API to handle image caching with Ion.

However, I believe (but might be wrong) Ion respects the Cache-Control HTTP-header if set.

IMO, you should go on with Picasso library for image-related network tasks, and use Ion for the rest (because it lacks that caching flexibility).

shkschneider
  • 17,833
  • 13
  • 59
  • 112
  • Thanks. The author claims images are persisted across app launches, but I haven't seen evidence of it yet. Trying to ensure the cache control headers are set to verify that. Picasso doesn't have this capability and is far less capable than Ion. – Jackpile Nov 01 '14 at 22:08