Documentation ¶
Index ¶
- func Get(ctx context.Context, key string) (interface{}, error)
- func InitCache(name string, opt CacheOption)
- func Overdue(ctx context.Context, key interface{}) bool
- func Set(ctx context.Context, key string, value interface{}) (interface{}, error)
- func SetEx(ctx context.Context, key string, value interface{}, sec int) (interface{}, error)
- type Cache
- type CacheBaseRedis
- func (c *CacheBaseRedis) Get(ctx context.Context, key string) (interface{}, error)
- func (c *CacheBaseRedis) Overdue(ctx context.Context, key interface{}) bool
- func (c *CacheBaseRedis) Set(ctx context.Context, key string, value interface{}) (interface{}, error)
- func (c *CacheBaseRedis) SetEx(ctx context.Context, key string, value interface{}, sec int) (interface{}, error)
- type CacheOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitCache ¶ added in v0.0.3
func InitCache(name string, opt CacheOption)
Types ¶
type Cache ¶
type CacheBaseRedis ¶
func (*CacheBaseRedis) Get ¶
func (c *CacheBaseRedis) Get(ctx context.Context, key string) (interface{}, error)
func (*CacheBaseRedis) Overdue ¶
func (c *CacheBaseRedis) Overdue(ctx context.Context, key interface{}) bool
Click to show internal directories.
Click to hide internal directories.