xxf_react 0.8.8 → 0.8.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -53,8 +53,8 @@ export class HttpClient {
|
|
|
53
53
|
headers: {},
|
|
54
54
|
timeout: 30000,
|
|
55
55
|
retry: 2,
|
|
56
|
-
memoryCacheMaxSize:
|
|
57
|
-
diskCacheMaxSize:
|
|
56
|
+
memoryCacheMaxSize: 500,
|
|
57
|
+
diskCacheMaxSize: 5000,
|
|
58
58
|
dbName: 'xxf-http-cache',
|
|
59
59
|
defaultKeyHeaders: [], // 默认不包含任何 header,避免 token 变化导致缓存失效
|
|
60
60
|
defaultCache: undefined, // 默认不缓存 (OnlyRemote)
|
|
@@ -31,9 +31,9 @@ export interface HttpClientConfig {
|
|
|
31
31
|
timeout?: number;
|
|
32
32
|
/** 默认重试次数,默认 2 */
|
|
33
33
|
retry?: number;
|
|
34
|
-
/** 内存缓存最大条目数,默认
|
|
34
|
+
/** 内存缓存最大条目数,默认 500 */
|
|
35
35
|
memoryCacheMaxSize?: number;
|
|
36
|
-
/** 磁盘缓存最大条目数,默认
|
|
36
|
+
/** 磁盘缓存最大条目数,默认 5000 */
|
|
37
37
|
diskCacheMaxSize?: number;
|
|
38
38
|
/** IndexedDB 数据库名,默认 'xxf-http-cache' */
|
|
39
39
|
dbName?: string;
|