mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-03 23:20:25 +08:00
12 lines
199 B
Go
12 lines
199 B
Go
package ttlcache
|
|
|
|
import "github.com/cespare/xxhash/v2"
|
|
|
|
func HashKeyBytes(key []byte) uint64 {
|
|
return xxhash.Sum64(key)
|
|
}
|
|
|
|
func HashKeyString(key string) uint64 {
|
|
return xxhash.Sum64String(key)
|
|
}
|