forked from forgejo/forgejo
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:
parent
3ab580c8d6
commit
eca05b09aa
10 changed files with 153 additions and 28 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue