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 } }) }
func (t *AppTest) Before() { println("Set up") mcClient = memcache.New(mcServer) }
func init() { revel.OnAppStart(func() { mcServer = revel.Config.StringDefault("memcached", "127.0.0.1:11211") mcClient = memcache.New(mcServer) }) }