Remove ristretto cache
This commit is contained in:
@@ -15,7 +15,6 @@ import (
|
||||
"github.com/debridmediamanager/zurg/pkg/logutil"
|
||||
"github.com/debridmediamanager/zurg/pkg/realdebrid"
|
||||
"github.com/debridmediamanager/zurg/pkg/utils"
|
||||
"github.com/dgraph-io/ristretto"
|
||||
"github.com/julienschmidt/httprouter"
|
||||
"github.com/panjf2000/ants/v2"
|
||||
)
|
||||
@@ -45,17 +44,7 @@ func MainApp(configPath string) {
|
||||
|
||||
utils.EnsureDirExists("data")
|
||||
|
||||
cache, err := ristretto.NewCache(&ristretto.Config{
|
||||
NumCounters: 1e5, // 200,000 to track frequency for 100,000 items.
|
||||
MaxCost: 100 << 20, // maximum cost of cache (100MB).
|
||||
BufferItems: 1 << 10, // number of keys per Get buffer, can be adjusted.
|
||||
})
|
||||
if err != nil {
|
||||
zurglog.Errorf("Failed to create cache: %v", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
torrentMgr := torrent.NewTorrentManager(config, rd, p, cache, log.Named("manager"))
|
||||
torrentMgr := torrent.NewTorrentManager(config, rd, p, log.Named("manager"))
|
||||
|
||||
downloadClient := http.NewHTTPClient(config.GetToken(), config.GetRetriesUntilFailed(), 0, config, log.Named("dlclient"))
|
||||
getfile := universal.NewGetFile(downloadClient)
|
||||
|
||||
Reference in New Issue
Block a user