Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Deinit ¶ added in v0.4.0
func Deinit()
Deinit stops the cache and ensures that all open connections to external services are closed before the application exits.
func Get ¶
Get returns a value from the cache. When there is no valid cache item available, the function will return the passed parameter t.
func Init ¶
Init initializes the caching system. The cache implementation used is chosen by the supplied Mode. The function might return an error if a configuration issue occurred.
func Invalidate ¶
Invalidate the cache item with the given key and type. The function returns whether an item has been invalidated or not.
Types ¶
type Dsn ¶
type Dsn string
Dsn is the information necessary to connect to a remote server like redis. It is necessary for some cache implementations.