Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Simple ¶
type Simple interface { Get(key string) (interface{}, bool) GetOrCompute(key string, creator func(key string) interface{}) (interface{}, bool) Put(key string, value interface{}) bool PutIfAbsent(key string, creator func(key string) interface{}) bool Has(key string) bool Remove(key string) bool Clear() }
type WithExpiry ¶
type WithExpiry interface { Simple GetOrComputeTimed(key string, lifetime time.Duration, creator func(key string) interface{}) (interface{}, bool) PutTimed(key string, lifetime time.Duration, value interface{}) bool PutTimedIfAbsent(key string, lifetime time.Duration, creator func(key string) interface{}) bool }
func NewWithExpiry ¶
func NewWithExpiry() WithExpiry
Click to show internal directories.
Click to hide internal directories.