|
|
@@ -44,7 +44,7 @@ func (c *groupCache) GetLimit(limit string, groupId int64) (*model.Group, error) |
|
|
|
|
|
|
|
// Set 设置群组缓存 |
|
|
|
func (c *groupCache) Set(group *model.Group) error { |
|
|
|
err := db.RedisUtil.Set(GroupKey+strconv.FormatInt(group.Id, 10), group, 24*time.Hour) |
|
|
|
err := db.RedisUtil.Set(GroupKey+strconv.FormatInt(group.Id, 10), group, 4*time.Hour) |
|
|
|
if err != nil { |
|
|
|
return gerrors.WrapError(err) |
|
|
|
} |
|
|
@@ -53,7 +53,7 @@ func (c *groupCache) Set(group *model.Group) error { |
|
|
|
|
|
|
|
// SetLimit 设置群组缓存 |
|
|
|
func (c *groupCache) SetLimit(limit string, group *model.Group) error { |
|
|
|
err := db.RedisUtil.Set(GroupKey+limit+":"+strconv.FormatInt(group.Id, 10), group, 24*time.Hour) |
|
|
|
err := db.RedisUtil.Set(GroupKey+limit+":"+strconv.FormatInt(group.Id, 10), group, 4*time.Hour) |
|
|
|
if err != nil { |
|
|
|
return gerrors.WrapError(err) |
|
|
|
} |
|
|
|