// Set injects the Store object in the context to be returned by Get as is.
172151
func Set(c context.Context, s Store) context.Context {
	if s == nil {
		return SetFactory(c, nil)
	}
	return SetFactory(c, func(context.Context) Store { return s })
}
189054
func (cache *Cache) Set(key string, image *imageserver.Image, params imageserver.Params) error {
	item := &item{
		image: image,
	}
	cache.lru.Set(key, item)
	return nil
}
461530
func (r *RequestParams) Set(key, value string) {
	r.Store.Set(key, value)
}
619944
func (c *contextValues) Set(key string, value interface{}) {
	if *c == nil {
		*c = make(map[string]interface{})
	}
	(*c)[key] = value
}
938617
func (c *SimpleLRUCache) Set(key string, value interface{}) {
	item := cacheItem{
		key:     key,
		value:   value,
		expires: timeFunc().Add(c.expiration),
	}

	c.lruCache.Add(key, item)
}
776446
func (cs cachedStore) Set(key, value string) error {
	// check if record already exists
	ctx := context.Background()
	dk := datastore.NewKey(ctx, "camnetdns", key, 0, nil)
	var oldValue dsValue
	if err := cs.dsClient.Get(ctx, dk, &oldValue); err != nil {
		if err != datastore.ErrNoSuchEntity {
			return fmt.Errorf("error checking if record exists for %q from datastore: %v", key, err)
		}
		// record does not exist, write it.
		return cs.put(ctx, key, value)
	}
	// record already exists
	if oldValue.Record != value {
		// new record is different, overwrite old one.
		return cs.put(ctx, key, value)
	}
	// record is the same as before
	if oldValue.Updated.Add(staleRecord).After(time.Now()) {
		// record is still fresh, nothing to do.
		return nil
	}
	// record is older than 30 days, so we rewrite it, for analytics.
	return cs.put(ctx, key, value)
}
1371907
func (l *ShardedNoTS) Set(tenantID, key string, val interface{}) error {
	_, ok := l.cache[tenantID]
	if !ok {
		l.cache[tenantID] = l.constructor()
		l.itemCount[tenantID] = 0
	}

	l.itemCount[tenantID]++
	return l.cache[tenantID].Set(key, val)
}
463398
func (s *RedisKVStore) Set(key string, value string) error {
	if !strings.HasPrefix(key, s.prefix) {
		key = s.prefix + key
	}
	return s.client.Set(key, value, 0).Err()
}
319421
func Set(req *http.Request, key interface{}, value interface{}) {
	crc := getContextReadCloser(req)
	crc.Context()[key] = value
}
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
}
366290
func (assocs *associations) set(endpoint string, assoc Association) {
	assocs.Lock()
	defer assocs.Unlock()
	assocs.store[strings.TrimRight(endpoint, "/")] = assoc
}
676613
func Set(ctx context.Context, t types.Target) context.Context {
	return context.WithValue(ctx, targetKey, t)
}
26981
func (s *Session) Set(key string, value interface{}) {
	s.set(key, value, false)
}
715593
func (st *MemSessionStore) Set(key, value interface{}) {
	st.lock.Lock()
	defer st.lock.Unlock()
	st.value[key] = value
}
683896
func (s *Settings) Set(c context.Context, key string, value interface{}, who, why string) error {
	blob, err := json.Marshal(value)
	if err != nil {
		return err
	}
	return s.storage.UpdateSetting(c, key, json.RawMessage(blob), who, why)
}
961408
func (s *RedisApplicationStore) Set(new *Application, properties ...string) (err error) {
	now := time.Now()
	new.UpdatedAt = now
	if new.old == nil {
		new.CreatedAt = now
	}
	err = s.store.Set(new.AppID, *new, properties...)
	if err != nil {
		return
	}
	return nil
}
163830
func (r *Store) Set(ctx context.Context, name string, sec store.Secret) error {
	ctx, store, name := r.getStore(ctx, name)
	return store.Set(ctx, name, sec)
}