summaryrefslogtreecommitdiffstats
path: root/routers/repo/commit.go
diff options
context:
space:
mode:
authorLauris BH <lauris@nix.lv>2017-10-26 04:37:33 +0300
committerLunny Xiao <xiaolunwen@gmail.com>2017-10-26 09:37:33 +0800
commiteca05b09aa269dda1309ee77ac750e29e71c3fd3 (patch)
tree8f5a4aa5c7da0de3e6c2a16f8a567b0b1b0c758b /routers/repo/commit.go
parent3ab580c8d6b8a2c063d848f8e3002347c9e5cebb (diff)
downloadgitea-eca05b09aa269dda1309ee77ac750e29e71c3fd3.tar.gz
gitea-eca05b09aa269dda1309ee77ac750e29e71c3fd3.zip
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
Diffstat (limited to 'routers/repo/commit.go')
-rw-r--r--routers/repo/commit.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/repo/commit.go b/routers/repo/commit.go
index 21a0d9dd9f..637a50543a 100644
--- a/routers/repo/commit.go
+++ b/routers/repo/commit.go
@@ -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