// setMemcacheSession sets the specified session in the Memcache.
171159
func (s *memcacheStore) setMemcacheSession(sess Session) (success bool) {
	item := &memcache.Item{
		Key:        s.keyPrefix + sess.ID(),
		Object:     sess,
		Expiration: sess.Timeout(),
	}

	var err error
	for i := 0; i < s.retries; i++ {
		if err = s.codec.Set(s.ctx, item); err == nil {
			return true
		}
	}

	log.Errorf(s.ctx, "Failed to add session to memcache, id: %s, error: %v", sess.ID(), err)
	return false
}
728215
func (s *RegisterUserInput) SetSessionName(v string) *RegisterUserInput {
	s.SessionName = &v
	return s
}
821280
func (m *MockAuthorizeRequester) SetSession(arg0 fosite.Session) {
	m.ctrl.Call(m, "SetSession", arg0)
}
306837
func (s *Event) SetSession(v *Session) *Event {
	s.Session = v
	return s
}
1343726
func (s *MemorySession) Set(key string, value interface{}) error {
	s.data[key] = value
	return nil
}
257581
func (s *Service) ExpireSession(ctx context.Context, key string) error {
	return s.kv.Update(ctx, func(tx Tx) error {
		sn, err := s.findSession(ctx, tx, key)
		if err != nil {
			return err
		}

		sn.ExpiresAt = time.Now()

		if err := s.putSession(ctx, tx, sn); err != nil {
			return err
		}
		return nil
	})
}
620957
func (s *ContainerOverride) SetMemory(v int64) *ContainerOverride {
	s.Memory = &v
	return s
}
1147024
func (s *Container) SetMemory(v string) *Container {
	s.Memory = &v
	return s
}
1130094
func (s *ContainerDefinition) SetMemoryReservation(v int64) *ContainerDefinition {
	s.MemoryReservation = &v
	return s
}
993110
func (s *GetRemoteAccessSessionOutput) SetRemoteAccessSession(v *RemoteAccessSession) *GetRemoteAccessSessionOutput {
	s.RemoteAccessSession = v
	return s
}
288117
func (s *Session) SetCacheSize(size int) {
	C.sp_session_set_cache_size(s.sp_session, C.size_t(size))
}
1113678
func (c *MemcacheClient) SetKey(k cache.Keyer, refreshDeadline time.Time, v []byte) error {
	expiry := refreshDeadline.Sub(time.Now()) * 2
	if expiry < MinExpiry {
		expiry = MinExpiry
	}

	deadlineBytes := make([]byte, 4, 4)
	binary.BigEndian.PutUint32(deadlineBytes, uint32(refreshDeadline.Unix()))
	if err := c.client.Set(&memcache.Item{
		Key:        k.Key(),
		Value:      append(deadlineBytes, v...),
		Expiration: int32(expiry.Seconds()),
	}); err != nil {
		c.logger.Log("err", errors.Wrap(err, "storing in memcache"))
		return err
	}
	return nil
}
9857
func (d *Domain) SetMemory(memory uint64) error {
	var err C.virError
	result := C.virDomainSetMemoryWrapper(d.ptr, C.ulong(memory), &err)
	if result == -1 {
		return makeError(&err)
	}
	return nil
}
804220
func (m *MockRequester) SetSession(arg0 fosite.Session) {
	m.ctrl.Call(m, "SetSession", arg0)
}
1352668
func (s *CreateRemoteAccessSessionOutput) SetRemoteAccessSession(v *RemoteAccessSession) *CreateRemoteAccessSessionOutput {
	s.RemoteAccessSession = v
	return s
}
249261
func (c *Cache) Set(key string, resp []byte) {
	item := &memcache.Item{
		Key:   cacheKey(key),
		Value: resp,
	}
	c.Client.Set(item)
}
941545
func NewMemcache(conn []string, lifeTime int32) *Memcache {
	rc := &Memcache{}
	rc.c = memcache.New(conn...)
	rc.LifeTime = lifeTime
	return rc
}