清除毕加索的缓存 [英] Clear Cache memory of Picasso

查看:29
本文介绍了清除毕加索的缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过 Android 编码清除 Picasso 的缓存.

I'm trying to clear the cache memory of Picasso via Android coding.

谁能帮我解决这个问题..?

Can anyone please help me in this issue..?

我曾尝试使用以下代码,但这对我来说没有用:

I have tried using the following code, but this was not useful in my case:

Picasso.with(getActivity()).load(data.get(pos).getFeed_thumb_image()).skipMemoryCache().into(image);

推荐答案

如果您尝试通过 Json(来自 db)加载图像,请尝试清除 networkCache 以获得更好的结果.

if you are trying to load an image through Json(from db) try clearing the networkCache for a better result.

Picasso.with(context).load(uri).networkPolicy(NetworkPolicy.NO_CACHE)
        .memoryPolicy(MemoryPolicy.NO_CACHE)
        .placeholder(R.drawable.bv_logo_default).stableKey(id)
        .into(viewImage_imageView);

这篇关于清除毕加索的缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆