Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cacher ¶
type Cacher interface { // GetData load data from cache // if cache not exist load data by LoadFunc // expiration is redis server expiration // ttl is developer expiration GetData(ctx context.Context, key string, expiration time.Duration, ttl time.Duration, f LoadFunc, data interface{}) (err error) // FlushCache flush cache // if cache not exist, load data and save cache FlushCache(ctx context.Context, key string, expiration time.Duration, ttl time.Duration, f LoadFunc, data interface{}) (err error) }
Click to show internal directories.
Click to hide internal directories.