I’m using Picasso in my app for download and cache images.
its Work great but there is a problem : app has a lot of images and after a short time app cache increase over 10 MB !
after long search I found this solution for limiting cache in Picasso but doesn’t work :
private void initPicaso() {
// Create memory cache
Cache memoryCache = new LruCache((int) PICASSO_DISK_CACHE_SIZE);
Picasso mPicasso = new Picasso.Builder(getApplicationContext())
.memoryCache(memoryCache).build();
Picasso.setSingletonInstance(mPicasso);
}
Im using this method in onCreate of my app application class .
What is wrong in my work ? or is there other way to achieve this ?
{i hope explain my problem clear :/ }