flutter_cache_manager icon indicating copy to clipboard operation
flutter_cache_manager copied to clipboard

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

Open CPRen0 opened this issue 1 year ago • 8 comments

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?

CPRen0 avatar Jan 09 '24 10:01 CPRen0

+1 are you solve that ?

boyXiong avatar Apr 01 '24 06:04 boyXiong

+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…

CPRen0 avatar Apr 01 '24 06:04 CPRen0

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 avatar Apr 01 '24 06:04 boyXiong

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 avatar Apr 01 '24 07:04 CPRen0

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 avatar Apr 01 '24 07:04 CPRen0

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

boyXiong avatar Apr 01 '24 07:04 boyXiong

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

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

CPRen0 avatar Apr 01 '24 07:04 CPRen0

这样啊,谢谢

boyXiong avatar Apr 01 '24 07:04 boyXiong