mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-29 10:57:44 +09:00 
			
		
		
		
	Add commit count caching (#2774)
* Add commit count caching * Small refactoring * Add different key prefix for refs and commits * Add configuratuion option to allow to change caching time or disable it
This commit is contained in:
		| @@ -55,7 +55,7 @@ func Commits(ctx *context.Context) { | ||||
| 	} | ||||
| 	ctx.Data["PageIsViewCode"] = true | ||||
|  | ||||
| 	commitsCount, err := ctx.Repo.Commit.CommitsCount() | ||||
| 	commitsCount, err := ctx.Repo.GetCommitsCount() | ||||
| 	if err != nil { | ||||
| 		ctx.Handle(500, "GetCommitsCount", err) | ||||
| 		return | ||||
| @@ -91,7 +91,7 @@ func Graph(ctx *context.Context) { | ||||
| 	ctx.Data["PageIsCommits"] = true | ||||
| 	ctx.Data["PageIsViewCode"] = true | ||||
|  | ||||
| 	commitsCount, err := ctx.Repo.Commit.CommitsCount() | ||||
| 	commitsCount, err := ctx.Repo.GetCommitsCount() | ||||
| 	if err != nil { | ||||
| 		ctx.Handle(500, "GetCommitsCount", err) | ||||
| 		return | ||||
|   | ||||
		Reference in New Issue
	
	Block a user