Baseflow / flutter_cache_manager

Generic cache manager for flutter
https://baseflow.com
MIT License
738 stars 427 forks source link

How can I get the total size of the cache or get the cache path? #441

Open CPRen0 opened 5 months ago

CPRen0 commented 5 months ago

I'd like to show the cache size for users, please how can I get the total size of the cache or get the cache path?

boyXiong commented 3 months ago

+1 are you solve that ?

CPRen0 commented 3 months ago

+1 are you solve that ?

After reading the source code, you can know the cache path. 'getTemporaryDirectory()'

![Uploading 截屏2024-04-01 14.56.27.png…]()

boyXiong commented 3 months ago

I want to customize the cache path to manage these cached files without having them delete themselves. Are you implementing the FileSystem yourself? Thank you

CPRen0 commented 3 months ago

I want to customize the cache path to manage these cached files without having them delete themselves. Are you implementing the FileSystem yourself? Thank you

I'm sorry, I didn't do that

CPRen0 commented 3 months ago

I want to customize the cache path to manage these cached files without having them delete themselves. Are you implementing the FileSystem yourself? Thank you

我只是使用了默认的存储方式,在默认的基础上进行了一个简单的封装,把过期时间和最大存储数量进行了个配置

boyXiong commented 3 months ago

牛逼啊, 是自己实现了 FileSystem 中的 createFile 方法吗,这个方法 可以用来实现自定义存储路径吗,谢谢

CPRen0 commented 3 months ago

牛逼啊, 是自己实现了 FileSystem 中的 createFile 方法吗,这个方法 可以用来实现自定义存储路径吗,谢谢

没有没有,我只是在DefaultCacheManager上进行修改的,存储方式仍和原来一样

boyXiong commented 3 months ago

这样啊,谢谢