Invalidate Picasso cache remotely

Invalidate Picasso cache remotely

I’m currently working on a commuter app (Madrid Metro|Bus|Cercanias) that allows you to browse among more than 1000 bus line maps (.png files). Obviously instead of shipping 500MB .png files within the apk I’m hosting these files on Amazon Simple Storage Service (aka Amazon S3) and the app just downloads and caches the images on the device upon user request thanks to the Picasso library for Android.

But what happens when any of these maps are replaced in S3 by a new version?

  1. When the map is not cached:
    User requests map of line let’s say 123, Picasso checks its cache and as the .png is not there an internet request will be executed and the last version from S3 downloaded (and cached). Fine 🙂
  2. When the map is already cached:
    User requests map of line 123, Picasso checks its cache and there is a .png file already cached, then it will be used directly without requesting the new one that is available at S3. User is seeing an old version. Terrible! :S

Read more…

No Comments

Leave a Reply

CONSULTING AND COOPERATION

OUR PARTNERS


We collaborate and receive information from the main companies and organizations.
WE ARE OPEN TO COOPERATION

CONTACT US


Our spirit is to be always available to new collaborations to get new products and services

Address:

C/ General Álvarez de Castro, 5
28010 Madrid
Spain

Phone:

1+(34)-620-519184
1+(34)-617-732657

Hours:

Mon-Fri 10am - 13pm




DO YOU KNOW OUR LATEST APP?

GET IT NOW