Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Lru ¶
type Lru struct {
// MaxEntries is the maximum number of cache entries
// before an item is evicted. Zero means no limit.
MaxEntries int
// LoadFunc specifies the function that loads a value
// for a specific key when not found in the cache.
LoadFunc func(ctx aws.Context, key Key) (interface{}, error)
// Optional KeyMarshaller. Caller should provide one when using
// Key type which is not comparable. eg. slice
KeyMarshaller func(key Key) Key
// contains filtered or unexported fields
}
Lru is a cache which is safe for concurrent access.
Click to show internal directories.
Click to hide internal directories.