Comments (17)
RxJava1
from rxcache.
有在多个线程对一个ArrayList 进行操作吗? 可以将你的调用代码贴出来吗
from rxcache.
我这里是有多个fragment,执行结束后分别调用.compose(DeepApp.getInstance().getRxCache()
.<OperateResult>transformer(
defaultCacheKey()
, new TypeToken<OperateResult>() {
}.getType()
, defaultCacheStrategy()))
from rxcache.
应该是多线程导致的,嵌套fragment
from rxcache.
使用版本com.zchu:rxcache:1.2.3
from rxcache.
内存大小设为0还是会出现相同的问题
from rxcache.
.memoryMax(0)
from rxcache.
.transformer(
defaultCacheKey()
, new TypeToken() {
}.getType()
, defaultCacheStrategy()))
如果缓存不是list这种带泛型的type,可以直接传class。还有最好不要用同一个key,估计同时对同一个key的缓存操作就会出现你这种情况
from rxcache.
我试了一下,开2个线程同时去对同一个key的缓存操作并不会有问题。
另外我说一下我对你遇到的情况的一些疑问。
- 我不清楚你具体做了什么操作导致的该异常,是不是在缓存过程中对数据源做了其他操作。
- 你缓存的数据源是什么?
- 你用的缓存策略是什么?
如果你的工程源码可以公开,那你可以让我看看。
from rxcache.
我用的策略需要缓存情况onlyRemote 不需要缓存且有网情况:cacheAndRemote 不需要缓存且无网情况onlyCache,Android系统 7.1.1
from rxcache.
我稍微测试了一下应该是和系统版本有关系,6.0不会退出
from rxcache.
测试了一下只有7.0以上系统有崩溃的问题,但是有个问题,我用的策略是CacheStrategy.onlyRemote(),也会崩溃,逻辑上应该是不走cache,这个策略希望可以优化,或者添加一个只走网络请求不缓存的策略.
祝好!
from rxcache.
只走网络请求不缓存其实跟直接不使用rxcache一样, 你是想动态配置缓存策略吧
from rxcache.
可以,满足你
from rxcache.
只走网络请求不缓存的策略已经加上,CacheStrategy.none(),可以切换到v1分支查看。
至于7.0以上系统崩溃的问题,我还是不清楚是什么原因导致。
你可以fork我的工程,在sample中添加导致该错误的代码演示,给我看看
from rxcache.
你好,问题已经查明并解决,使用v1.2.5即可
from rxcache.
好的 我有机会试下 感谢
from rxcache.
Related Issues (20)
- 在使用磁盘缓存时,在remove或者clean时,会出现空指针,程序未做非空判断。
- RxCache 几种模式在移动端场景。
- 建议,缓存策略,添加只缓存内存,或者只保存硬盘的。
- 建议添加到公共jcenter仓库 HOT 2
- 添加2.x版本,Fragment就找不到getContext() HOT 2
- LruDiskCache出现问题 HOT 3
- 优先缓存,并设置超时时间 这条没懂。。
- 关于分页缓存的管理
- 建议添加获取所有缓存key的方法。这样更有利于对于缓存的管理
- 报这个是什么错误额? HOT 2
- cacheAndRemote使用问题 HOT 3
- Expected BEGIN_OBJECT but was STRING at line 1 column 78 path $.data.version HOT 1
- 此项目还维护吗 HOT 1
- 不支持返回Single 吗?。。
- 可以支持优先加载缓存,并且同时缓存最新的网络数据 HOT 1
- 缓存第二次获取不到
- Jcenter 仓库地址已失效 HOT 1
- 2.3.3的库引用失败 HOT 1
- could not resolve HOT 1
- 支持post缓存吗?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rxcache.