base-diskcache
base-diskcache copied to clipboard
Android 缓存库,融合了DiskLruCache和ASimpleCache.
private synchronized void completeEdit(Editor editor, boolean success) throws IOException { Entry entry = editor.entry; if (entry.currentEditor != editor) { throw new IllegalStateException(); } ....... } 请问在这里IllegalStateException异常是什么问题,如果程序抛出这个异常,应该怎么处理
错误如下 09-21 16:00:51.672 7584-7584/com.51.puh.debug W/System.err: java.io.EOFException at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2342) at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2811) 09-21 16:00:51.673 7584-7584/com.51.puh.debug W/System.err: at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:805) at java.io.ObjectInputStream.(ObjectInputStream.java:302) at com.51.puh.moduler.disk.DiskLruCacheHelper.getAsSerializable(DiskLruCacheHelper.java:322) at com.51.puh.repository.GameRepository$1.loadFromDb(GameRepository.java:88) at cn.51.librepository.api.NetworkBoundResource.(NetworkBoundResource.java:41) at com.51.puh.repository.GameRepository$1.(GameRepository.java:66) at com.51.puh.repository.GameRepository.getGameList(GameRepository.java:66) at com.51.puh.viewmodel.GameListViewModel.lambda$new$0(GameListViewModel.java:53)...
如何设置缓存失效时间?