mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-02 14:56:38 +08:00
refactor(core): decouple gin from pkg/util and reduce code duplication
This commit is contained in:
Vendored
+4
-1
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user