Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Item2CacheItem ¶ added in v0.0.15
func Item2CacheItem(item *Item) *cache.Item
Types ¶
type Item ¶
type Item struct { Ctx context.Context Key string Value interface{} // TTL is the cache expiration time. // Default TTL is 1 hour. TTL time.Duration // Do returns value to be cached. Do func(*Item) (interface{}, error) // SetXX only sets the key if it already exists. SetXX bool // SetNX only sets the key if it does not already exist. SetNX bool // SkipLocalCache skips local cache as if it is not set. SkipLocalCache bool }
Click to show internal directories.
Click to hide internal directories.