mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-04 05:18:25 +00:00 
			
		
		
		
	Prepare for v0.3.0 release
This commit is contained in:
		@@ -12,7 +12,6 @@ import (
 | 
			
		||||
 | 
			
		||||
	_ "github.com/go-sql-driver/mysql"
 | 
			
		||||
	"github.com/go-xorm/xorm"
 | 
			
		||||
	_ "github.com/gogits/cache"
 | 
			
		||||
	_ "github.com/lib/pq"
 | 
			
		||||
 | 
			
		||||
	"github.com/gogits/gogs/modules/base"
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										11
									
								
								modules/base/base_memcache.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								modules/base/base_memcache.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
			
		||||
// +build memcache
 | 
			
		||||
 | 
			
		||||
package base
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	_ "github.com/gogits/cache/memcache"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func init() {
 | 
			
		||||
	EnableMemcache = true
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										11
									
								
								modules/base/base_redis.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								modules/base/base_redis.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
			
		||||
// +build redis
 | 
			
		||||
 | 
			
		||||
package base
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	_ "github.com/gogits/cache/redis"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func init() {
 | 
			
		||||
	EnableRedis = true
 | 
			
		||||
}
 | 
			
		||||
@@ -77,6 +77,9 @@ var (
 | 
			
		||||
	SessionManager  *session.Manager
 | 
			
		||||
 | 
			
		||||
	PictureService string
 | 
			
		||||
 | 
			
		||||
	EnableRedis    bool
 | 
			
		||||
	EnableMemcache bool
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
var Service struct {
 | 
			
		||||
@@ -174,10 +177,10 @@ func newLogService() {
 | 
			
		||||
 | 
			
		||||
func newCacheService() {
 | 
			
		||||
	CacheAdapter = Cfg.MustValue("cache", "ADAPTER", "memory")
 | 
			
		||||
	if cache.EnableRedis {
 | 
			
		||||
	if EnableRedis {
 | 
			
		||||
		log.Info("Redis Enabled")
 | 
			
		||||
	}
 | 
			
		||||
	if cache.EnableMemcache {
 | 
			
		||||
	if EnableMemcache {
 | 
			
		||||
		log.Info("Memcache Enabled")
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user