|
|
|
@@ -31,7 +31,7 @@ func GetRepoTopNContributors(repo *models.Repository, N int) ([]*models.Contribu |
|
|
|
log.Debug("Get RepoTopNContributors from disk,repo.ID = %d ", repo.ID) |
|
|
|
jsonVal, err := json.Marshal(&ContributorCacheVal{Contributors: contributorInfos, Total: total}) |
|
|
|
if err == nil { |
|
|
|
redis_client.Setex(redis_key.RepoTopNContributors(repo.ID, N), string(jsonVal), 5*time.Minute) |
|
|
|
redis_client.Setex(redis_key.RepoTopNContributors(repo.ID, N), string(jsonVal), 2*time.Minute) |
|
|
|
} |
|
|
|
return contributorInfos, total |
|
|
|
} |
|
|
|
|