2020-11-21 21:43:03 +08:00
|
|
|
package ttlcache
|
2020-11-21 20:44:19 +08:00
|
|
|
|
2020-11-21 22:29:57 +08:00
|
|
|
import "github.com/cespare/xxhash"
|
2020-11-21 20:44:19 +08:00
|
|
|
|
|
|
|
|
func HashKey(key []byte) uint64 {
|
2020-11-21 22:29:57 +08:00
|
|
|
return xxhash.Sum64(key)
|
2020-11-21 20:44:19 +08:00
|
|
|
}
|