|
@@ -111,4 +111,12 @@ public class OkgoClientCache {
|
|
|
.retryCount(RETRY_COUNT)// 重试
|
|
|
.execute(callback);
|
|
|
}
|
|
|
+
|
|
|
+ public static String getDefaultCacheKey(String url, HttpParams params){
|
|
|
+ // 请求路径
|
|
|
+ url = String.format(url, host);
|
|
|
+ // 缓存key
|
|
|
+ String key = MD5Coder.getMD5Code(url + "?" + SignParams.getSortParams(params));
|
|
|
+ return key;
|
|
|
+ }
|
|
|
}
|