Files
EdgeNode/internal/ttlcache/utils.go

12 lines
199 B
Go
Raw Normal View History

2020-11-21 21:43:03 +08:00
package ttlcache
2024-04-18 18:25:33 +08:00
import "github.com/cespare/xxhash/v2"
2024-04-18 18:25:33 +08:00
func HashKeyBytes(key []byte) uint64 {
2020-11-21 22:29:57 +08:00
return xxhash.Sum64(key)
}
2024-04-18 18:25:33 +08:00
func HashKeyString(key string) uint64 {
return xxhash.Sum64String(key)
}