lawdao / appcache Goto Github PK
View Code? Open in Web Editor NEWAndroid app 缓存解决方案 流式编码方式
Android app 缓存解决方案 流式编码方式
7天缓存,之后要再次设置数据,这样的能不能用这个库解决?
谢谢你封装的库,带泛型的对象就缓存不了了,可以在文档中注明一下哟。
我现在碰到的一个场景 app 广告页 想用AppCache ,通过判断缓存的图片地址和上一次是否一样,来进行新的缓存,但是上次缓存的广告图片需要删除,这样就不会本地产生垃圾图片。现在是我需要自己保存一份上次图片地址为key,来判断,去删除。所以希望带自定义key 方便替换删除。
Attempt to invoke virtual method 'cc.fussen.cache.disklrucache.DiskLruCache$Snapshot cc.fussen.cache.disklrucache.DiskLruCache.get(java.lang.String)' on a null object reference你好作者,我想问这个是原因呢???
这个缓存操作不需要在子线程里操作吗?
DiskLruCache 有个 delete 方法来清除所有缓存,在这个库里面有什么办法能删除所有缓存嘛? 目前只有把所有的key放在一个集合里面 然后要删除所有的时候整个遍历一边remove
public class GameTabBean implements Parcelable,Serializable {}
这个bean里嵌套里别的ben。都实现里Parcelable,Serializable。但是不能保存
用这个库了,但是小米手机一直报错。
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.io.File.getPath()' on a null object reference
disklrucache.Util.getCacheDir(Util.java)
还有就是 Cache.with(context)有时候也是空的
线上用户手机(都为OPPO)获取不到缓存,无崩溃重启,7.1系统。
自己也没有重现这个问题,一开始怀疑是存储权限问题,但是把存储权限关了也是可以使用的。
获取不到缓存还会有什么其他原因吗?
看源码我也没找到原因!
谢谢
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.