@@ -10,7 +10,7 @@ import (
10
10
"github.com/djdv/go-filesystem-utils/internal/filesystem"
11
11
fserrors "github.com/djdv/go-filesystem-utils/internal/filesystem/errors"
12
12
"github.com/djdv/go-filesystem-utils/internal/generic"
13
- lru "github.com/hashicorp/golang-lru/v2"
13
+ "github.com/hashicorp/golang-lru/arc /v2"
14
14
coreiface "github.com/ipfs/boxo/coreiface"
15
15
coreoptions "github.com/ipfs/boxo/coreiface/options"
16
16
corepath "github.com/ipfs/boxo/coreiface/path"
26
26
ipld.Node
27
27
* nodeInfo
28
28
}
29
- ipfsNodeCache = lru .ARCCache [cid.Cid , ipfsRecord ]
30
- ipfsDirCache = lru .ARCCache [cid.Cid , []filesystem.StreamDirEntry ]
29
+ ipfsNodeCache = arc .ARCCache [cid.Cid , ipfsRecord ]
30
+ ipfsDirCache = arc .ARCCache [cid.Cid , []filesystem.StreamDirEntry ]
31
31
IPFS struct {
32
32
ctx context.Context
33
33
cancel context.CancelFunc
@@ -102,7 +102,7 @@ func (settings *ipfsSettings) fillInDefaults() error {
102
102
}
103
103
104
104
func (settings * ipfsSettings ) initNodeCache (count int ) error {
105
- nodeCache , err := lru .NewARC [cid.Cid , ipfsRecord ](count )
105
+ nodeCache , err := arc .NewARC [cid.Cid , ipfsRecord ](count )
106
106
if err != nil {
107
107
return err
108
108
}
@@ -111,7 +111,7 @@ func (settings *ipfsSettings) initNodeCache(count int) error {
111
111
}
112
112
113
113
func (settings * ipfsSettings ) initDirectoryCache (count int ) error {
114
- dirCache , err := lru .NewARC [cid.Cid , []filesystem.StreamDirEntry ](count )
114
+ dirCache , err := arc .NewARC [cid.Cid , []filesystem.StreamDirEntry ](count )
115
115
if err != nil {
116
116
return err
117
117
}
0 commit comments