// Get function get the newest data for keys having `prefix` prefix. it returned error only when key is empty.
// it return all the data when prefix is '*'
969627
func (w *BaseWatcher) Get(prefix string) (map[string]interface{}, error) {
	switch prefix {
	case "":
		return nil, fmt.Errorf("empty key")
	case "*":
		return w.Sender.GetAll(), nil
	default:
		return w.Sender.Get(prefix), nil
	}
}
1049167
func (c *RedisCache) Get(key string, data interface{}) bool {
	b, ok := c.GetGobBytes(key)
	if !ok {
		return false
	}

	dec := gob.NewDecoder(bytes.NewBuffer(b))
	dec.Decode(data)
	return true
}
1280023
func (c *Cache) Get(key string) (value interface{}, err error) {
	out := struct {
		Cache string      `json:"cache"`
		Key   string      `json:"key"`
		Value interface{} `json:"value"`
	}{}
	if err = c.caches(c.Name, "items", key).Req("GET", nil, &out); err == nil {
		value = out.Value
	}
	return
}
649889
func (mem *Memory) Get(key string) interface{} {
	if ret, ok := mem.data[key]; ok {
		if ret.Expired.Before(time.Now()) {
			mem.deleteKey(key)
			return nil
		}
		return ret.Data
	}
	return nil
}
844362
func (c *ExpireCache) Get(key interface{}) (interface{}, bool) {
	c.mutex.Lock()
	defer c.mutex.Unlock()

	record, ok := c.cache[key]
	if !ok {
		c.stats.Miss++
		return nil, ok
	}

	// Since this was recently accessed, keep it in
	// the cache by resetting the expire time
	record.ExpireAt = time.Now().UTC().Add(c.ttl)

	c.stats.Hit++
	return record.Value, ok
}
1257708
func Get(key string, args ...interface{}) data.Value {
	return defaultCacher().Get(key, args...)
}
605019
func (pdb *prefixDB) Get(key []byte) []byte {
	pdb.mtx.Lock()
	defer pdb.mtx.Unlock()

	pkey := pdb.prefixed(key)
	value := pdb.db.Get(pkey)
	return value
}
461999
func (s *RedisStore) Get(key interface{}) interface{} {
	s.lock.RLock()
	defer s.lock.RUnlock()

	return s.data[key]
}
125541
func (c *MemoryCache) Get(key string) (resp []byte, ok bool) {
	c.mu.RLock()
	resp, ok = c.items[key]
	c.mu.RUnlock()
	return resp, ok
}
76034
func (t *table) Get(key []byte) ([]byte, error) {
	return t.db.Get(append([]byte(t.prefix), key...))
}
165302
func (b *Backend) Get(ctx context.Context, key string) ([]byte, error) {
	if b.cache == nil && b.prefetch {
		err := b.fetchTree(ctx)
		if err != nil {
			return nil, err
		}
	}

	if b.cache != nil {
		return b.fromCache(ctx, key)
	}

	var opt api.QueryOptions

	kv, _, err := b.client.KV().Get(path.Join(b.prefix, key), opt.WithContext(ctx))
	if err != nil {
		return nil, err
	}

	if kv == nil {
		return nil, backend.ErrNotFound
	}

	return kv.Value, nil
}
621733
func (c *Conn) Get(key string) (string, error) {
	s, err := c.GetBytes(key)
	if err != nil {
		return "", err
	}
	return string(s), nil
}
544199
func (r *Request) Get(key string) string {
	return r.QueryValues().Get(key)
}
1121944
func (rkv *KeyValue) Get(key string) (string, error) {
	conn := rkv.pool.Get(rkv.dbindex)
	result, err := redis.String(conn.Do("GET", rkv.id+":"+key))
	if err != nil {
		return "", err
	}
	return result, nil
}
380720
func (c *SimpleLRUCache) Get(key string) (interface{}, bool) {
	data, ok := c.lruCache.Get(key)
	if data != nil && ok {
		var item cacheItem
		item, _ = data.(cacheItem)
		item.expires = timeFunc().Add(c.expiration) // update the expiration
		c.lruCache.Add(key, item)
		return item.value, true
	}
	return nil, false
}
277109
func (s *Session) Get(key string) interface{} {
	if s.data == nil {
		return nil
	}
	return s.data[key]
}
694095
func (c *DbClient) GetDataForPrefix(prefix string) []*decoder.FileDataEntry {
	c.Lock()
	defer c.Unlock()

	var keyValues []*decoder.FileDataEntry
	for _, file := range c.db {
		for key, value := range file {
			if strings.HasPrefix(key, prefix) {
				keyValues = append(keyValues, &decoder.FileDataEntry{
					Key:   key,
					Value: value.data,
				})
			}
		}
	}
	return keyValues
}