// Set will persist a value to the cache or
// override existing one with the new one
975170
func (r *MemoryNoTS) Set(key string, value interface{}) error {
	r.items[key] = value
	return nil
}
1192165
func (c *UserCardCache) Set(card *keybase1.UserCard, usedSession bool) error {
	return c.cache.Set(c.key(card.Uid, usedSession), *card)
}
810440
func (c *cache) Set(id types.UID, status *PodStatus, err error, timestamp time.Time) {
	c.lock.Lock()
	defer c.lock.Unlock()
	defer c.notify(id, timestamp)
	c.pods[id] = &data{status: status, err: err, modified: timestamp}
}
872158
func (m *MemoryStorer) Set(key, value string) error {
	m.mut.Lock()
	m.sessions[key] = memorySession{
		expires: time.Now().UTC().Add(m.maxAge),
		value:   value,
	}
	m.mut.Unlock()

	return nil
}
8553
func (a *Async) Set(key string, image *imageserver.Image, params imageserver.Params) error {
	go func() {
		_ = a.Cache.Set(key, image, params)
	}()
	return nil
}
1344315
func (cache *HealthStatusCache) set(key HealthStatusKey, value HealthStatus, expires time.Time) {
	cache.data[key] = HealthStatusItem{value: value, expires: expires}
}
422897
func (kv *KeyValue) Set(key, value string) error {
	if !kv.host.rawUTF8 {
		Encode(&value)
	}
	if _, err := kv.Get(key); err != nil {
		// Key does not exist, create it
		_, err = kv.host.db.Exec("INSERT INTO "+kv.table+" ("+keyCol+", "+valCol+") VALUES (?, ?)", key, value)
		return err
	}
	// Key exists, update the value
	_, err := kv.host.db.Exec("UPDATE "+kv.table+" SET "+valCol+" = ? WHERE "+keyCol+" = ?", value, key)
	return err
}
766377
func (c *InMemoryCache) Set(_ context.Context, key Key, value Thunk) {
	c.items.Store(key.String(), value)
}
848408
func (r *Redis) Set(key string, value interface{}) error {
	return r.Client.Set(key, convertToBytes(value), 0).Err()
}
721977
func (s *memcachedStorage) Set(key string, val interface{}, expires time.Duration) error {
	item := &cachedItem{Val: val}
	bytes, err := encodeGob(item)
	if err != nil {
		return err
	}

	var expiresInSeconds int64
	if expires != 0 {
		expiresInSeconds = int64(expires) / int64(time.Second)
	}

	memcachedItem := newItem(key, bytes, int32(expiresInSeconds))
	return s.c.Set(memcachedItem)
}
607474
func (ai *AtomicInt) Set(newValue int) {
	atomic.StoreInt64(&ai.val, int64(newValue))
}
259180
func (c *Cache) Set(key string, resp []byte) {
	c.db.Put([]byte(key), resp, nil)
}
28507
func (cache *HealthStatusCache) Set(key HealthStatusKey, value HealthStatus, expire time.Duration) {
	cache.mu.Lock()
	defer cache.mu.Unlock()
	cache.set(key, value, time.Now().Add(expire))
}
819280
func (c *IgnoreError) Set(key string, image *imageserver.Image, params imageserver.Params) error {
	_ = c.Cache.Set(key, image, params)
	return nil
}
251846
func (c *Context) Set(key string, value interface{}) {
	c.store.set(key, value)
}
954003
func (c *Client) Set(key, value string) (err error) {
	_, err = c.execWithKey(true, "SET", key, value)
	return
}
1329555
func (hm *SyncedHashMap) Set(key Hashable, value interface{}) {
	hm.Lock()
	defer hm.Unlock()
	(*hm).keys[key.Hash()] = key
	(*hm).values[key.Hash()] = value
}