diff options
author | Lauris BH <lauris@nix.lv> | 2017-10-26 04:37:33 +0300 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-10-26 09:37:33 +0800 |
commit | eca05b09aa269dda1309ee77ac750e29e71c3fd3 (patch) | |
tree | 8f5a4aa5c7da0de3e6c2a16f8a567b0b1b0c758b /routers/init.go | |
parent | 3ab580c8d6b8a2c063d848f8e3002347c9e5cebb (diff) | |
download | gitea-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/init.go')
-rw-r--r-- | routers/init.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/routers/init.go b/routers/init.go index 006f285266..8cfbe39ee5 100644 --- a/routers/init.go +++ b/routers/init.go @@ -11,6 +11,7 @@ import ( "code.gitea.io/git" "code.gitea.io/gitea/models" "code.gitea.io/gitea/models/migrations" + "code.gitea.io/gitea/modules/cache" "code.gitea.io/gitea/modules/cron" "code.gitea.io/gitea/modules/highlight" "code.gitea.io/gitea/modules/log" @@ -18,6 +19,7 @@ import ( "code.gitea.io/gitea/modules/markup" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/ssh" + macaron "gopkg.in/macaron.v1" ) @@ -37,6 +39,7 @@ func checkRunMode() { func NewServices() { setting.NewServices() mailer.NewContext() + cache.NewContext() } // GlobalInit is for global configuration reload-able. |