java - Flush Universal Image Loader cache -


i'm using volley singleton load images

 private volleysingleton(){         mrequestqueue = volley.newrequestqueue(volleyapplication.getappcontext());          mimageloader = new imageloader(this.mrequestqueue, new imageloader.imagecache() {             private final lrucache<string, bitmap> mcache = new lrucache<string, bitmap>(10);             public void putbitmap(string url, bitmap bitmap) {                 mcache.put(url, bitmap);             }             public bitmap getbitmap(string url) {                 return mcache.get(url);             }         });     } 

i need flush cache update imageview when photo changed.

i've read memorycacheutils here can't seem implment in code, can use memorycacheutils in code? if not there way flush cache in imageloader?

edit

exposing lrucache

  private volleysingleton(){         mrequestqueue = volley.newrequestqueue(volleyapplication.getappcontext());          mimageloader = new imageloader(this.mrequestqueue, new imageloader.imagecache() {             private final lrucache<string, bitmap> mcache = new lrucache<string, bitmap>(10);             public void flushlrucache(){ mcache.evictall();};             public void putbitmap(string url, bitmap bitmap) {                 mcache.put(url, bitmap);             }             public bitmap getbitmap(string url) {                 return mcache.get(url);             }         });     } 

i'm trying access imageloader.imagecache flush = (imageloader.imagecache) mimageloader;

i can't access though.

lrucache has method evictall(), expose method in imageloader subclass clear cache.


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

datatable - Matlab struct computations -