redis.go 564 字节
package constant

var (
	REDIS_HOST    = "host.docker.internal"
	REDIS_PORT    = "6379"
	REDIS_AUTH    = ""
	REDIS_ADDRESS = ""

	// 是否关闭仓储层缓存
	ENABLE_REPOSITORY_CACHE = true
)

func init() {
	REDIS_HOST = Configurator.DefaultString("REDIS_HOST", REDIS_HOST)
	REDIS_PORT = Configurator.DefaultString("REDIS_PORT", REDIS_PORT)
	REDIS_AUTH = Configurator.DefaultString("REDIS_AUTH", REDIS_AUTH)
	ENABLE_REPOSITORY_CACHE = Configurator.DefaultBool("ENABLE_REPOSITORY_CACHE", ENABLE_REPOSITORY_CACHE)
	REDIS_ADDRESS = REDIS_HOST + ":" + REDIS_PORT
}