android - How Picasso Actually Cache the Images -
I would like to know how Picasso Library is caching images inside the application. I know that the HTTP headers are used to check the weather to bring images from the network.
But, is there a time limit that he is caching images?
Discovery of cash in a day or a while?
The problem is that my project is loading large numbers of small images from the network. Sometimes, new images appear in the next launch. But, it does not happen for some time.
The worst part is, changes in some images are reflected, while others are not changed at the same time.
, when I uninstall the app, the change in all images (exactly.)Picasso should have something about caching.
And please do not tell me to use OHTPT to control the cache at Don Picasso.
My project is using Async HTTu client from Apache and it is too big to update (not by me, of course.) Instead of implementing complete non-compliant HTTP client, a small network with URL connection Makes me a helper.)Anyway, any thought or suggestion would be appreciated.
Bottom Line: No OKTTP wants to know about the cash control mechanism on Picasso only.Regards
As far as I know Picasso We do not clean the cache, so in our app we are triggering "manual". To do this, the code is:
Private Static Last String PICASSO_CACHE = "Picasso-Cash"; Public Static Zero Clear Cache (Reference Reference) {Final File Cache = New File (context.getApplicationContext (). GetCacheDir (), PICASSO_CACHE); If (cache.exists ()) {deleteFolder (cache); }} Private static zero deletion folder (file file and directory) {if (fileOrDirectory.isDirectory ()) {{file child: fileOrDirectory.listFiles ()) deleteFolder (child); } FileOrDirectory.delete (); }
You can trigger this cleanup worker in a day / week, what you need in your app
Comments
Post a Comment