i have Volley network ImageView , problem is when image is changed inside sever volley still uses cached image which is old one , is there anyway that volley understand that image changed inside server ? or if there is't , how can i prevent it from caching ?
here is my current code :
private void networkImage(){
String url = "http://example.com/profilePictures/"+username+".jpg";
networkImageView = (NetworkImageView) findViewById(R.id.IBProfilePicture);
networkImageView.setOnClickListener(this);
RequestQueue networkQueue = Volley.newRequestQueue(getApplicationContext());
networkQueue.getCache().remove(url);
networkQueue.getCache().clear();
ImageLoader networkImageLoader = new ImageLoader(networkQueue, new ImageLoader.ImageCache() {
@Override
public Bitmap getBitmap(String url) {
return null;
}
@Override
public void putBitmap(String url, Bitmap bitmap) {
}
});
networkImageView.setImageUrl(url,networkImageLoader);
}