Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultExpiration = 5 * time.Minute
Variables ¶
View Source
var ( // UseRedis indicates whether to use redis. UseRedis bool )
Functions ¶
func Add ¶
Add adds a key/value pair to the redis only if the key doesn't already exist, or if the key has expired. Returns an error otherwise.
func Delete ¶
func Delete(key string)
Delete deletes a key/value pair by key from the redis whether it exists or not.
func Get ¶
Get gets a value by key from the redis. It returns the value and a boolean indicating whether the key was found in the redis.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.