mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-12-14 14:50:25 +08:00
优化xxhash和fnv相关代码
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
package ttlcache
|
||||
|
||||
import "github.com/cespare/xxhash"
|
||||
import "github.com/cespare/xxhash/v2"
|
||||
|
||||
func HashKey(key []byte) uint64 {
|
||||
func HashKeyBytes(key []byte) uint64 {
|
||||
return xxhash.Sum64(key)
|
||||
}
|
||||
|
||||
func HashKeyString(key string) uint64 {
|
||||
return xxhash.Sum64String(key)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user