picasso - Android Image invalidate in fresco -
i migrating android image caching library picasso fresco. want know if there way invalidate image catched adding feature replace existing image there way in picasso like
picasso.with(context).invalidate(uri);
this line remove cached image , use new 1 using url provided same like,
http://example.com/image_path
in fresco have tried using
fresco.getimagepipeline().evictfrommemorycache(uri);
this removing image view adding same old cached image again , not getting new 1 network working in picasso.
please refer question invalidate cache in picasso accepted answer doing great in case of picasso.
fresco.getimagepipeline().evictfrommemorycache(uri);
above code line remove image catche image remains there in disk , render same if called. need remove same image disk well. bellow 2 lines remove the image disc cache need remove small thumbnail image if saved disk cache.
fresco.getimagepipelinefactory().getmaindiskstoragecache().remove(new simplecachekey(uri.tostring())); fresco.getimagepipelinefactory().getsmallimagediskstoragecache().remove(new simplecachekey(uri.tostring()));
note: if using custom cache key need change way.
Comments
Post a Comment