mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	remove tags redis and memcache
This commit is contained in:
		@@ -15,10 +15,12 @@ import (
 | 
				
			|||||||
	"strings"
 | 
						"strings"
 | 
				
			||||||
	"time"
 | 
						"time"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"gopkg.in/ini.v1"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	"github.com/Unknwon/com"
 | 
						"github.com/Unknwon/com"
 | 
				
			||||||
 | 
						_ "github.com/go-macaron/cache/memcache"
 | 
				
			||||||
 | 
						_ "github.com/go-macaron/cache/redis"
 | 
				
			||||||
	"github.com/go-macaron/session"
 | 
						"github.com/go-macaron/session"
 | 
				
			||||||
 | 
						_ "github.com/go-macaron/session/redis"
 | 
				
			||||||
 | 
						"gopkg.in/ini.v1"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"github.com/gogits/gogs/modules/bindata"
 | 
						"github.com/gogits/gogs/modules/bindata"
 | 
				
			||||||
	"github.com/gogits/gogs/modules/log"
 | 
						"github.com/gogits/gogs/modules/log"
 | 
				
			||||||
@@ -140,9 +142,6 @@ var (
 | 
				
			|||||||
	CacheInternal int
 | 
						CacheInternal int
 | 
				
			||||||
	CacheConn     string
 | 
						CacheConn     string
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	EnableRedis    bool
 | 
					 | 
				
			||||||
	EnableMemcache bool
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Session settings.
 | 
						// Session settings.
 | 
				
			||||||
	SessionConfig session.Options
 | 
						SessionConfig session.Options
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -545,13 +544,6 @@ func newLogService() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
func newCacheService() {
 | 
					func newCacheService() {
 | 
				
			||||||
	CacheAdapter = Cfg.Section("cache").Key("ADAPTER").In("memory", []string{"memory", "redis", "memcache"})
 | 
						CacheAdapter = Cfg.Section("cache").Key("ADAPTER").In("memory", []string{"memory", "redis", "memcache"})
 | 
				
			||||||
	if EnableRedis {
 | 
					 | 
				
			||||||
		log.Info("Redis Supported")
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	if EnableMemcache {
 | 
					 | 
				
			||||||
		log.Info("Memcache Supported")
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	switch CacheAdapter {
 | 
						switch CacheAdapter {
 | 
				
			||||||
	case "memory":
 | 
						case "memory":
 | 
				
			||||||
		CacheInternal = Cfg.Section("cache").Key("INTERVAL").MustInt(60)
 | 
							CacheInternal = Cfg.Section("cache").Key("INTERVAL").MustInt(60)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,15 +0,0 @@
 | 
				
			|||||||
// +build memcache
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// Copyright 2014 The Gogs Authors. All rights reserved.
 | 
					 | 
				
			||||||
// Use of this source code is governed by a MIT-style
 | 
					 | 
				
			||||||
// license that can be found in the LICENSE file.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
package setting
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import (
 | 
					 | 
				
			||||||
	_ "github.com/go-macaron/cache/memcache"
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func init() {
 | 
					 | 
				
			||||||
	EnableMemcache = true
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,16 +0,0 @@
 | 
				
			|||||||
// +build redis
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// Copyright 2014 The Gogs Authors. All rights reserved.
 | 
					 | 
				
			||||||
// Use of this source code is governed by a MIT-style
 | 
					 | 
				
			||||||
// license that can be found in the LICENSE file.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
package setting
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import (
 | 
					 | 
				
			||||||
	_ "github.com/go-macaron/cache/redis"
 | 
					 | 
				
			||||||
	_ "github.com/go-macaron/session/redis"
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func init() {
 | 
					 | 
				
			||||||
	EnableRedis = true
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
		Reference in New Issue
	
	Block a user