This repository was archived by the owner on Apr 13, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +18
-4
lines changed
rxcache/src/main/java/com/zchu/rxcache Expand file tree Collapse file tree 4 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -218,6 +218,11 @@ public enum CacheTarget {
218218 });
219219```
220220
221+ 同步获取缓存:
222+ ```java
223+ CacheResult <String > = rxCache.<String >loadSync(" test_key1" , String .class );
224+ ```
225+
221226
222227
223228## 混淆配置
Original file line number Diff line number Diff line change 11// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
33buildscript {
4- ext. kotlin_version = ' 1.2.71 '
4+ ext. kotlin_version = ' 1.3.21 '
55 repositories {
66 jcenter()
77 maven {
@@ -11,7 +11,7 @@ buildscript {
1111 google()
1212 }
1313 dependencies {
14- classpath ' com.android.tools.build:gradle:3.2.1 '
14+ classpath ' com.android.tools.build:gradle:3.3.0 '
1515
1616 classpath ' com.github.dcendents:android-maven-gradle-plugin:2.0'
1717 classpath " guru.stefma.bintrayrelease:bintrayrelease:1.1.1"
Original file line number Diff line number Diff line change 1- # Tue Nov 06 15:49:27 CST 2018
1+ # Fri Feb 15 13:36:39 SGT 2019
22distributionBase =GRADLE_USER_HOME
33distributionPath =wrapper/dists
44zipStoreBase =GRADLE_USER_HOME
55zipStorePath =wrapper/dists
66org.gradle.daemon =true
7- distributionUrl =https\://services.gradle.org/distributions/gradle-4.6 -all.zip
7+ distributionUrl =https\://services.gradle.org/distributions/gradle-4.10.1 -all.zip
88org.gradle.parallel =true
Original file line number Diff line number Diff line change @@ -95,6 +95,15 @@ public Publisher<CacheResult<T>> apply(Flowable<T> flowable) {
9595 }
9696
9797
98+ /**
99+ * 同步读取缓存
100+ * 会阻塞主线程,请在子线程调用
101+ */
102+ public <T > CacheResult <T > loadSync (final String key , final Type type ) {
103+ return cacheCore .load (getMD5MessageDigest (key ), type );
104+ }
105+
106+
98107 /**
99108 * 读取
100109 */
You can’t perform that action at this time.
0 commit comments