aboutsummaryrefslogtreecommitdiff
path: root/modules/middleware
diff options
context:
space:
mode:
Diffstat (limited to 'modules/middleware')
-rw-r--r--modules/middleware/context.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/middleware/context.go b/modules/middleware/context.go
index cb3cbabc..a25a3dbb 100644
--- a/modules/middleware/context.go
+++ b/modules/middleware/context.go
@@ -12,8 +12,11 @@ import (
"github.com/codegangsta/martini"
"github.com/martini-contrib/sessions"
+ "github.com/gogits/cache"
+
"github.com/gogits/gogs/models"
"github.com/gogits/gogs/modules/auth"
+ "github.com/gogits/gogs/modules/base"
"github.com/gogits/gogs/modules/log"
)
@@ -25,6 +28,7 @@ type Context struct {
Req *http.Request
Res http.ResponseWriter
Session sessions.Session
+ Cache cache.Cache
User *models.User
IsSigned bool
@@ -97,6 +101,7 @@ func InitContext() martini.Handler {
Req: r,
Res: res,
Session: session,
+ Cache: base.Cache,
Render: rd,
}