perf(storage): add config caching and shared HTTP connection pool

- Implement thread-safe local config caching with a 5s TTL check.
- Reuse backend client singletons in storage.Active and storage.ForDriver.
- Reset in-memory config cache on configuration saves and updates.
- Create internal/httppool package to manage shared HTTP transports.
- Configure WebDAV client and CDN retrieval to reuse the shared pool.
- Add unit tests for httppool and storage caching behaviors.
This commit is contained in:
ryan
2026-06-13 15:15:59 +08:00
parent 9a18bea324
commit bc18800b58
8 changed files with 295 additions and 8 deletions
@@ -246,6 +246,10 @@ func UpdateSystemConfig(c *gin.Context) {
return
}
if key == model.ConfigKeyStorageConfig {
storage.ResetCache()
}
c.JSON(http.StatusOK, util.OKNil())
}