Chandru Chandru - 1 year ago 122
Android Question

Picasso image loading previously cached images

I am using picasso library in my project to fetch url images from the server into my ImageView, but unfortunately picasso loading the previously cached images from disc instead of loading the new images from url. Please find the below piece of code for your reference.

Picasso.with (ImageActivity.this)
.placeholder (R.drawable.default_user)
.error (R.drawable.default_user)

I have also tried the solutions like:

  1. Picasso.with(ImageActivity.this).invalidate(url);

  2. Picasso.with (ImageActivity.this)
    .placeholder (R.drawable.default_user)
    .error (R.drawable.default_user)

But nothing is working for my requirement. Kindly help me to resolve my issues.

Thanks in advance.

Answer Source

Try :

        .memoryPolicy(MemoryPolicy.NO_CACHE )
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download