MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / NewRandReplKeyCache

Function NewRandReplKeyCache

auth/password_hash.go:108–113  ·  view source on GitHub ↗

Returns a new random replacement key-only cache that can potentially grow upto the provided size.

(size int)

Source from the content-addressed store, hash-verified

106// Returns a new random replacement key-only cache that can
107// potentially grow upto the provided size.
108func NewRandReplKeyCache(size int) *RandReplKeyCache {
109 return &RandReplKeyCache{
110 size: size,
111 cache: make(map[string]struct{}),
112 }
113}
114
115// Contains returns true if the provided key is present
116// in the cache and false otherwise.

Calls

no outgoing calls