Пример #1
0
// 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
}
Пример #2
0
func (rp *MemProvider) connectInit() error {
	client = memcache.New(rp.conninfo...)
	return nil
}
Пример #3
0
// connect to memcache and keep the connection.
func (rc *MemcacheCache) connectInit() error {
	rc.conn = memcache.New(rc.conninfo...)
	return nil
}