// init memcache session // savepath like // e.g. 127.0.0.1:9090 func (rp *MemProvider) SessionInit(maxlifetime int64, savePath string) error { rp.maxlifetime = maxlifetime rp.conninfo = strings.Split(savePath, ";") client = memcache.New(rp.conninfo...) return nil }
func (rp *MemProvider) connectInit() error { client = memcache.New(rp.conninfo...) return nil }
// connect to memcache and keep the connection. func (rc *MemcacheCache) connectInit() error { rc.conn = memcache.New(rc.conninfo...) return nil }