feat: make 5m cache-creation ratio configurable

This commit is contained in:
Seefs committed 2026-02-06 19:46:59 +08:00
1 parent cb34e23918
commit 8ef6089bf7
13 files changed
+99 -5

No files matched your search

+9
View File
@@ -169,6 +169,15 @@ func UpdateOption(c *gin.Context) {
})
return
}
case "CreateCacheRatio":
err = ratio_setting.UpdateCreateCacheRatioByJSONString(option.Value.(string))
if err != nil {
c.JSON(http.StatusOK, gin.H{
"success": false,
"message": "缓存创建倍率设置失败: " + err.Error(),
})
return
}
case "ModelRequestRateLimitGroup":
err = setting.CheckModelRequestRateLimitGroup(option.Value.(string))
if err != nil {