p2p: add cache for func PacketConn.relayPeer

This commit is contained in:
rkonfj
2025-02-15 20:47:12 +08:00
parent 88a2870174
commit 1476061b60
2 changed files with 24 additions and 20 deletions

2
cache/cache.go vendored
View File

@@ -33,7 +33,7 @@ var (
)
func init() {
defaultCache = lru.New[string, *CacheValue[any]](1024)
defaultCache = lru.New[string, *CacheValue[any]](2048)
}
// LoadTTL load value by key from default cache pool