Documentation ¶
Index ¶
- Constants
- type Cache
- func (c *Cache) DelUserBaseCache(ctx context.Context, userID uint64) error
- func (c *Cache) GetUserBaseCache(ctx context.Context, userID uint64) (data *model.UserBaseModel, err error)
- func (c *Cache) GetUserBaseCacheKey(userID uint64) string
- func (c *Cache) MultiGetUserBaseCache(ctx context.Context, userIDs []uint64) (map[string]*model.UserBaseModel, error)
- func (c *Cache) SetCacheWithNotFound(ctx context.Context, userID uint64) error
- func (c *Cache) SetUserBaseCache(ctx context.Context, userID uint64, user *model.UserBaseModel, ...) error
Constants ¶
View Source
const (
// PrefixUserBaseCacheKey cache前缀, 规则:业务+模块+{ID}
PrefixUserBaseCacheKey = "eagle:user:base:%d"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache cache
func (*Cache) DelUserBaseCache ¶
DelUserBaseCache 删除用户cache
func (*Cache) GetUserBaseCache ¶
func (c *Cache) GetUserBaseCache(ctx context.Context, userID uint64) (data *model.UserBaseModel, err error)
GetUserBaseCache 获取用户cache
func (*Cache) GetUserBaseCacheKey ¶
GetUserBaseCacheKey 获取cache key
func (*Cache) MultiGetUserBaseCache ¶
func (c *Cache) MultiGetUserBaseCache(ctx context.Context, userIDs []uint64) (map[string]*model.UserBaseModel, error)
MultiGetUserBaseCache 批量获取用户cache
func (*Cache) SetCacheWithNotFound ¶
SetCacheWithNotFound .
Click to show internal directories.
Click to hide internal directories.