refactor(core): decouple gin from pkg/util and reduce code duplication

This commit is contained in:
ryan
2026-08-28 20:15:47 +08:00
parent c52b7c4abf
commit df351cbd33
32 changed files with 394 additions and 432 deletions
+4 -1
View File
@@ -5,6 +5,7 @@
package disk
import (
"Wavelet/pkg/util"
"container/list"
"encoding/binary"
"errors"
@@ -100,7 +101,9 @@ var (
func Default() *Cache {
defaultCacheOnce.Do(func() {
defaultCache = New("uploads/diskcache")
go defaultCache.StartCleanupWorker(defaultCleanupInterval)
util.Go(func() {
defaultCache.StartCleanupWorker(defaultCleanupInterval)
})
})
return defaultCache
}