feat: optimize caching strategy and implement concurrency limits

This commit is contained in:
ExplodingDragon
2026-01-31 23:14:15 +08:00
parent 1aec59bfad
commit 662370e018
10 changed files with 148 additions and 41 deletions

View File

@@ -1,8 +1,20 @@
package utils
import "io"
import (
"io"
)
type SizeReadCloser struct {
io.ReadCloser
Size uint64
}
type CloserWrapper struct {
io.ReadCloser
OnClose func()
}
func (c *CloserWrapper) Close() error {
defer c.OnClose()
return c.ReadCloser.Close()
}