Documentation ¶
Overview ¶
Simple caching library with expiration capabilities
Index ¶
- func Cache(key string, value interface{})
- func CountEntries(prefix string) (result int)
- func Flush()
- func GetCached(key string) (v interface{}, err error)
- func GetKeyAge(key string) (time.Duration, error)
- func GetXCached(key string) (ece expiringCacheEntry, err error)
- func GetXKeyAge(key string) (time.Duration, error)
- func RemKey(key string)
- func RemPrefixKey(prefix string)
- func XCountEntries(prefix string) (result int)
- func XFlush()
- func XRemKey(key string)
- func XRemPrefixKey(prefix string)
- type XEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cache ¶
func Cache(key string, value interface{})
The function to be used to cache a key/value pair when expiration is not needed
func CountEntries ¶
func GetXCached ¶
Get an entry from the expiration cache and mark it for keeping alive
func RemPrefixKey ¶
func RemPrefixKey(prefix string)
func XCountEntries ¶
func XRemPrefixKey ¶
func XRemPrefixKey(prefix string)
Types ¶
Click to show internal directories.
Click to hide internal directories.