// Add implements the Cache interface.
974112
func (c *randomEvictedCache) Add(key Measurable, data Measurable) {
	memoizedKey := memoizedMeasurable{m: key}
	memoizedData := memoizedMeasurable{m: data}
	increase := c.entrySize(memoizedKey, memoizedData)
	if increase > c.maxBytes {
		return
	}
	c.mu.Lock()
	defer c.mu.Unlock()
	if v, ok := c.data[key]; ok {
		decrease := c.entrySize(memoizedKey, v)
		c.cachedBytes -= decrease
	}
	c.cachedBytes += increase
	for c.cachedBytes > c.maxBytes {
		c.evictOneLocked()
	}
	c.data[key] = memoizedData
	c.keys = append(c.keys, memoizedKey)
}
1035247
func (s *simpleCache) Add(id uint64, b *Row) {
	s.cache[id] = b
}
1105690
func (t *Timer) Add(key string, value interface{}) {
	t.context.Add(key, value)
}
97405
func (c *ReasonCache) add(uid types.UID, name string, reason error, message string) {
	c.lock.Lock()
	defer c.lock.Unlock()
	c.cache.Add(c.composeKey(uid, name), reasonItem{reason, message})
}
1230968
func (c *Cache) Add(key string, value interface{}) {
	if c.cache == nil {
		c.cache = make(map[string]*list.Element)
		c.ll = list.New()
	}
	if ee, ok := c.cache[key]; ok {
		c.ll.MoveToFront(ee)
		ee.Value.(*entry).value = value
		return
	}
	ele := c.ll.PushFront(&entry{key, value})
	c.cache[key] = ele
	if c.MaxEntries != 0 && c.ll.Len() > c.MaxEntries {
		c.RemoveOldest()
	}
}
1251282
func (c *Cache) Add(index uint64, obj interface{}) bool {
	return c.getShard(index).add(index, obj)
}
397446
func (c *cache) add(qname string, rr RR) {
	c.m.Lock()
	defer c.m.Unlock()
	c._add(qname, rr)
}
421760
func (lru *TTLRUCache) Add(key, val interface{}) {
	lru.AddWithExpire(key, val, time.Now().Add(lru.ttl))
}
253953
func (w *Wait) Add() {
	curr := atomic.LoadInt64(&w.totalCount)

	if curr < 0 {
		return
	}

	atomic.AddInt64(&w.totalCount, 1)
}
68652
func (bsh *BufferedServerHeader) Add(key string, value string) {
	if bsh.released {
		bsh.original.Set(key, value)
	} else {
		old := []string{}
		if v, found := bsh.headerMap[key]; found {
			old = v
		}
		bsh.headerMap[key] = append(old, value)
	}
}
1017776
func (r *Runtime) Add(ctx context.Context, task runtime.Task) error {
	return r.tasks.Add(ctx, task)
}
1199649
func (t *txLookup) Add(tx *types.Transaction) {
	t.lock.Lock()
	defer t.lock.Unlock()

	t.all[tx.Hash()] = tx
}
1311387
func (c *Scratch) Add(key string, newAddend interface{}) (string, error) {

	var newVal interface{}
	c.mu.RLock()
	existingAddend, found := c.values[key]
	c.mu.RUnlock()
	if found {
		var err error

		addendV := reflect.TypeOf(existingAddend)

		if addendV.Kind() == reflect.Slice || addendV.Kind() == reflect.Array {
			newVal, err = collections.Append(existingAddend, newAddend)
			if err != nil {
				return "", err
			}
		} else {
			newVal, err = math.DoArithmetic(existingAddend, newAddend, '+')
			if err != nil {
				return "", err
			}
		}
	} else {
		newVal = newAddend
	}
	c.mu.Lock()
	c.values[key] = newVal
	c.mu.Unlock()
	return "", nil // have to return something to make it work with the Go templates
}
1013774
func (v Values) Add(key, value string) {
	v[key] = append(v[key], value)
}
1154828
func (cache *stateInfoCache) Add(msg *proto.SignedGossipMessage) bool {
	if !cache.MessageStore.CheckValid(msg) {
		return false
	}
	if !cache.verify(msg) {
		return false
	}
	added := cache.MessageStore.Add(msg)
	if added {
		pkiID := msg.GetStateInfo().PkiId
		cache.MembershipStore.Put(pkiID, msg)
	}
	return added
}
455315
func (as *accountSet) add(addr common.Address) {
	as.accounts[addr] = struct{}{}
	as.cache = nil
}
1147403
func (c *Cache) Add(key, value interface{}) (evicted bool) {
	c.lock.Lock()
	evicted = c.lru.Add(key, value)
	c.lock.Unlock()
	return evicted
}