feat: implement submission repository and service layers with caching support
All checks were successful
Build and Release / release (push) Successful in 1m27s

This commit is contained in:
2026-05-06 10:56:30 +07:00
parent a61cf085ce
commit e7b0141684
2 changed files with 5 additions and 1 deletions

View File

@@ -317,7 +317,9 @@ func (r *submissionRepository) Delete(ctx context.Context, id pgtype.UUID) error
_ = r.c.Del(ctx, fmt.Sprintf("submission:id:%s", convert.UUIDToString(id)))
go func() {
_ = r.c.DelByPattern(context.Background(), "submission:count*")
bgCtx := context.Background()
_ = r.c.DelByPattern(bgCtx, "submission:search*")
_ = r.c.DelByPattern(bgCtx, "submission:count*")
}()
return nil
}

View File

@@ -825,5 +825,7 @@ func (s *submissionService) DeleteSubmission(ctx context.Context, userID string,
return fiber.NewError(fiber.StatusInternalServerError, "Failed to delete submission")
}
_ = s.c.Del(ctx, fmt.Sprintf("project:id:%s", submission.ProjectID))
return nil
}