Documentation ¶
Overview ¶
Package checkcache provides a scalable cache to hold results of Mixer.Check operations.
Entries are added into the cache by supplying an attribute bag along with a ReferencedAttributes struct which determines the set of attributes in the bag should be used as a cache lookup key. Entries are looked up from the cache using an attribute bag.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache holds cached results of calls to Mixer.Check
func New ¶
New creates a new instance of a check cache with the given maximum capacity. Adding more items to the cache then its capacity will cause eviction of older entries.
type Value ¶
type Value struct { // StatusCode for the Check operation StatusCode int32 // StatusMessage for the Check operation StatusMessage string // Expiration is the point at which this cache value becomes stale and shouldn't be used Expiration time.Time // ValidUseCount for the Check operation ValidUseCount int32 // ReferencedAttributes for the Check operation ReferencedAttributes mixerpb.ReferencedAttributes // RouteDirective for the completed Check operation RouteDirective *mixerpb.RouteDirective }
Value holds the data that the check cache stores.
Click to show internal directories.
Click to hide internal directories.