github.com/Axway/agent-sdk@v1.1.101/pkg/cache/item.go (about) 1 package cache 2 3 // Item - a cached item 4 type Item struct { 5 Object interface{} `json:"data"` 6 UpdateTime int64 `json:"updateTime"` 7 Hash uint64 `json:"hash"` 8 SecondaryKeys map[string]bool `json:"secondaryKeys"` // keep track of secondary keys for clean up 9 ForeignKey string `json:"foreignKey"` 10 ContainsPointer bool `json:"containsPointer"` // does item contain a pointer 11 } 12 13 // GetObject - returns the object saved in this cache item 14 func (i *Item) GetObject() interface{} { 15 return i.Object 16 } 17 18 // GetUpdateTime - returns the epoch time that this cache item was updated 19 func (i *Item) GetUpdateTime() int64 { 20 return i.UpdateTime 21 } 22 23 // GetHash - returns the hash of the object in this cache item 24 func (i *Item) GetHash() uint64 { 25 return i.Hash 26 }