-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.json
More file actions
47 lines (35 loc) · 1.53 KB
/
config.json
File metadata and controls
47 lines (35 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{
"// 注释": "这是Codeforces API工具的配置文件",
"// 说明": "修改此文件后,工具将使用新的配置设置",
"api": {
"// API基础URL": "Codeforces API的基础地址,通常不需要修改",
"baseUrl": "https://codeforces.com/api",
"// 请求超时时间(毫秒)": "API请求的超时时间,默认10秒",
"timeout": 10000,
"// 重试次数": "请求失败时的重试次数",
"retryAttempts": 3,
"// 重试延迟(毫秒)": "重试之间的等待时间",
"retryDelay": 1000,
"// 速率限制配置": "防止请求过于频繁",
"rateLimit": {
"// 时间窗口内最大请求数": "在指定时间窗口内允许的最大请求数",
"requests": 5,
"// 时间窗口(毫秒)": "速率限制的时间窗口",
"window": 1000,
"// 突发请求限制": "允许的突发请求数量",
"burstLimit": 5
}
},
"cache": {
"// 是否启用缓存": "启用缓存可以提高响应速度,减少API调用",
"enabled": true,
"// 缓存生存时间(秒)": "缓存数据的有效期,默认5分钟",
"ttl": 300,
"// 最大缓存条目数": "内存中保存的最大缓存条目数量",
"maxEntries": 1000,
"// 最大缓存大小(字节)": "缓存占用的最大内存大小,默认50MB",
"maxSize": 52428800,
"// 缓存目录": "磁盘缓存文件的存储位置,使用用户主目录下的.cf-tool/cache",
"cacheDir": "~/.cf-tool/cache"
}
}