MCPcopy Create free account
hub / github.com/PacktPublishing/System-Programming-Essentials-with-Go / CacheItem

Struct CacheItem

ch13/cache.go:10–13  ·  view source on GitHub ↗

CacheItem stores the value and the expiry time of a cache entry

Source from the content-addressed store, hash-verified

8
9// CacheItem stores the value and the expiry time of a cache entry
10type CacheItem struct {
11 Value string
12 ExpiryTime time.Time
13}
14
15// entry is a helper struct that stores a cache item along with its key
16type entry struct {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected