Prepare for v0.3.0 release

This commit is contained in:
Unknown 2014-04-21 06:54:07 -04:00
parent 660b47373d
commit de01f81489
4 changed files with 27 additions and 3 deletions

View File

@ -12,7 +12,6 @@ import (
_ "github.com/go-sql-driver/mysql" _ "github.com/go-sql-driver/mysql"
"github.com/go-xorm/xorm" "github.com/go-xorm/xorm"
_ "github.com/gogits/cache"
_ "github.com/lib/pq" _ "github.com/lib/pq"
"github.com/gogits/gogs/modules/base" "github.com/gogits/gogs/modules/base"

View File

@ -0,0 +1,11 @@
// +build memcache
package base
import (
_ "github.com/gogits/cache/memcache"
)
func init() {
EnableMemcache = true
}

View File

@ -0,0 +1,11 @@
// +build redis
package base
import (
_ "github.com/gogits/cache/redis"
)
func init() {
EnableRedis = true
}

View File

@ -77,6 +77,9 @@ var (
SessionManager *session.Manager SessionManager *session.Manager
PictureService string PictureService string
EnableRedis bool
EnableMemcache bool
) )
var Service struct { var Service struct {
@ -174,10 +177,10 @@ func newLogService() {
func newCacheService() { func newCacheService() {
CacheAdapter = Cfg.MustValue("cache", "ADAPTER", "memory") CacheAdapter = Cfg.MustValue("cache", "ADAPTER", "memory")
if cache.EnableRedis { if EnableRedis {
log.Info("Redis Enabled") log.Info("Redis Enabled")
} }
if cache.EnableMemcache { if EnableMemcache {
log.Info("Memcache Enabled") log.Info("Memcache Enabled")
} }