MCPcopy
hub / github.com/coocood/freecache / hashFunc

Function hashFunc

cache.go:27–29  ·  view source on GitHub ↗
(data []byte)

Source from the content-addressed store, hash-verified

25type Updater func(value []byte, found bool) (newValue []byte, replace bool, expireSeconds int)
26
27func hashFunc(data []byte) uint64 {
28 return xxhash.Sum64(data)
29}
30
31// NewCache returns a newly initialize cache by size.
32// The cache size will be set to 512KB at minimum.

Callers 15

SetMethod · 0.85
TouchMethod · 0.85
GetMethod · 0.85
MultiGetMethod · 0.85
GetFnMethod · 0.85
GetOrSetMethod · 0.85
SetAndGetMethod · 0.85
UpdateMethod · 0.85
PeekMethod · 0.85
PeekWithExpirationMethod · 0.85
PeekFnMethod · 0.85
GetWithBufMethod · 0.85

Calls

no outgoing calls

Tested by 1

BenchmarkHashFuncFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…