Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewIntervalStore ¶
func NewIntervalStore(cfg IntervalStoreConfig) *intervalStore
NewIntervalStore return a namespaced cache.Store that is backed in memory and refreshes its states at a regular interval.
func NewLRUStore ¶
func NewLRUStore(cfg LRUStoreConfig) *lruStore
NewLRUStore return a namespaced cache.Store that is backed in memory.
func NewTTLStore ¶
func NewTTLStore(cfg TTLStoreConfig) *ttlStore
NewTTLStore return a namespaced cache.Store that is backed in memory
Types ¶
type IntervalStoreConfig ¶
type IntervalStoreConfig struct {
// Capacity sets the maximum cache items allowed in the cache store, least-recent
// used items will get removed when capacity is reached.
Capacity int
CleanupInterval time.Duration
}
IntervalStoreConfig captures configs for NewLRUStore
type LRUStoreConfig ¶
type LRUStoreConfig struct {
// Capacity sets the maximum cache items allowed in the cache store, least-recent
// used items will get removed when capacity is reached.
Capacity int
}
LRUStoreConfig captures configs for NewLRUStore
type TTLStoreConfig ¶
TTLStoreConfig captures configs for ttlStore
Click to show internal directories.
Click to hide internal directories.