github.com/TeaOSLab/EdgeNode@v1.3.8/internal/ttlcache/utils.go (about)

     1  package ttlcache
     2  
     3  import "github.com/cespare/xxhash/v2"
     4  
     5  func HashKeyBytes(key []byte) uint64 {
     6  	return xxhash.Sum64(key)
     7  }
     8  
     9  func HashKeyString(key string) uint64 {
    10  	return xxhash.Sum64String(key)
    11  }