MCPcopy
hub / github.com/opencloud-eu/opencloud / Cache

Struct Cache

pkg/sync/cache.go:10–16  ·  view source on GitHub ↗

Cache is a barebones cache implementation.

Source from the content-addressed store, hash-verified

8
9// Cache is a barebones cache implementation.
10type Cache struct {
11 // capacity and length have to be the first words
12 // in order to be 64-aligned on 32-bit architectures.
13 capacity, length uint64 // access atomically
14 entries sync.Map
15 pool sync.Pool
16}
17
18// CacheEntry represents an entry on the cache. You can type assert on V.
19type CacheEntry struct {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected