增加有优雅的持久化管道,提高上传速度与抗打断机制

This commit is contained in:
ayflying
2025-09-02 18:16:55 +08:00
parent 299ba0b93e
commit e1f1bea0e7
2 changed files with 88 additions and 30 deletions

View File

@@ -63,7 +63,7 @@ type (
// @param add []*entity.GameAct: 添加数据
// @param update []*entity.GameAct: 更新数据
// @return err error: 返回错误信息
SaveV2(ctx context.Context, cacheKey string, add []*entity.GameAct, update []*entity.GameAct) (err error)
SaveV2(ctx context.Context, cacheKey string) (err error)
// Cache2Sql 缓存持久化到数据库
// @Description: 缓存持久化到数据库
// @receiver s *sGameAct: 游戏活动服务结构体指针
@@ -71,7 +71,7 @@ type (
// @param add []*entity.GameAct: 添加数据
// @param update []*entity.GameAct: 更新数据
// @return err error: 返回错误信息
Cache2Sql(ctx context.Context, add []*entity.GameAct, update []*entity.GameAct) (err error)
Cache2Sql(ctx context.Context, add []*entity.GameAct, update []*entity.GameAct)
// 删除缓存key
DelCacheKey(ctx context.Context, aid int, uid int64)
// 清空GetRedDot缓存