I read something about this issues but I didnt understand as well:
1: if I .resize(x,y)
an image in my code, then Picasso caches only the original size or the resized one too?
2: memory and disk cache are storing with different cache-key?
Yes and no.
Picasso caches resized images. If you call resize(50, 50)
on a URL twice the second request will use the resized image which was cached in memory. The HTTP client will never see the URL a second time in this case.
The HTTP client that Picasso uses will cache the original image (if configured to do so and the headers allow it). If you call resize(50, 50)
on a URL the original will be cached on disk by the HTTP client so that if you call resize(100, 100)
on that URL the HTTP client does not need to fetch the image again.
The HTTP client cache is completely opaque to Picasso. It doesn't see or control its contents. Picasso makes an HTTP request for every URL that isn't available in the memory cache and whether the HTTP client downloads it or serves it from the local cache is completely controlled inside the HTTP client.
1 - Yes, picasso only caches the original size.
2 - Yes.
The global default Picasso instance returned from with() is automatically initialized with defaults that are suitable to most implementations.
LRU memory cache of 15% the available application RAM
Disk cache of 2% storage space up to 50MB but no less than 5MB.
More information about caching in Picasso.
How do I use disk caching in Picasso?
Comparission with glide (also have infomation about caching)
http://inthecheesefactory.com/blog/get-to-know-glide-recommended-by-google/en