Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: #297 清除缓存功能失效 #326

Merged
merged 1 commit into from
Oct 19, 2024

Conversation

LeetaoGoooo
Copy link
Contributor

@LeetaoGoooo LeetaoGoooo commented Oct 19, 2024

fix #297

通过删除缓存目录的方式实现清除缓存的方式

CachedNetworkImage version 2.3 版本之后原本的 emptyCache 失效

只能通过 CachedNetworkImage 自带的 .evictFromCache(url) 去实现,不过当前项目要是需要记录所有的 url 改动有点大,折中方案的话,可以直接删除整个缓存目录

@Predidit
Copy link
Owner

看上去不错,我们这里是否应该把删除缓存目录的操作放置在 try-catch 结构体中来捕获可能的错误

@LeetaoGoooo
Copy link
Contributor Author

看上去不错,我们这里是否应该把删除缓存目录的操作放置在 try-catch 结构体中来捕获可能的错误

image

调用 _clearCache 的方法那里已经有 try-catch 了,所以就暂时没在这里加了,需要的话,我觉得可以加上

@Predidit
Copy link
Owner

Predidit commented Oct 19, 2024

啊,没仔细看,抱歉。

感谢你的工作。

我会在 CI 通过后合并这个PR。

@Predidit Predidit merged commit bf6f208 into Predidit:main Oct 19, 2024
5 checks passed
@LeetaoGoooo
Copy link
Contributor Author

啊,没仔细看,抱歉。

感谢你的工作。

我会在 CI 通过后合并这个PR。

没事 哈哈 很棒的项目~感谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: 清除缓存功能失效
2 participants