Browse Source

#3169

update
tags/v1.22.12.1^2
chenyifan01 3 years ago
parent
commit
3dc5fee4b4
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      services/repository/contributor.go

+ 1
- 1
services/repository/contributor.go View File

@@ -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
}


Loading…
Cancel
Save