Beispiel #1
0
func init() {
	revel.OnAppStart(func() {
		mcServers = strings.Split(revel.Config.StringDefault("memcached", "127.0.0.1:11211"), "|")
		mcClients = make(map[string]*memcache.Client)
		for _, server := range mcServers {
			mcClients[server] = memcache.New(server)
			mcClients[server].Timeout = time.Duration(1000) * time.Millisecond
		}
	})
}
Beispiel #2
0
func (t *AppTest) Before() {
	println("Set up")
	mcClient = memcache.New(mcServer)
}
Beispiel #3
0
func init() {
	revel.OnAppStart(func() {
		mcServer = revel.Config.StringDefault("memcached", "127.0.0.1:11211")
		mcClient = memcache.New(mcServer)
	})
}