// Get returns a value of a given key if it exists
// and valid for the time being
516530
func (r *ShardedTTL) Get(tenantID, key string) (interface{}, error) {
	r.Lock()
	defer r.Unlock()

	if !r.isValid(tenantID, key) {
		r.delete(tenantID, key)
		return nil, ErrNotFound
	}

	value, err := r.cache.Get(tenantID, key)
	if err != nil {
		return nil, err
	}

	return value, nil
}
1002521
func (l *Lazy) Get(key string) (interface{}, bool, error) {
	l.init()
	if l.initErr != nil {
		return nil, false, l.initErr
	}
	v, found := l.cache[key]
	return v, found, nil
}
371743
func (c *MemcacheCacher) Get(key string) interface{} {
	item, err := c.c.Get(key)
	if err != nil {
		return nil
	}
	return string(item.Value)
}
913585
func (c *Context) Get(key string) (interface{}, bool) {
	var value interface{}
	var exists bool
	if c.store != nil {
		value, exists = c.store[key]
	}
	return value, exists
}
327063
func (j *Json) Get(key string) *Json {
	m, err := j.Map()
	if err == nil {
		if val, ok := m[key]; ok {
			return &Json{val}
		}
	}
	return &Json{nil}
}
923191
func (t *timedCache) Get(key string) (interface{}, error) {
	entry, err := t.getInternal(key)
	if err != nil {
		return nil, err
	}

	// Data is still not cached yet, cache it by getter.
	if entry.data == nil {
		entry.lock.Lock()
		defer entry.lock.Unlock()

		if entry.data == nil {
			data, err := t.getter(key)
			if err != nil {
				return nil, err
			}

			entry.data = data
		}
	}

	return entry.data, nil
}
76271
func (params Params) Get(key string) (interface{}, error) {
	v, ok := params[key]
	if !ok {
		return nil, &ParamError{Param: key, Message: "not set"}
	}
	return v, nil
}
572890
func (n *NullTime) Get() *time.Time {
	if !n.Valid {
		return nil
	}

	return &n.Time
}
511180
func (v Values) Get(key string) string {
	if v == nil {
		return ""
	}
	vs, ok := v[key]
	if !ok || len(vs) == 0 {
		return ""
	}
	return vs[0]
}
205080
func (c *MemoryCacher) Get(key string) string {
	c.lock.RLock()
	defer c.lock.RUnlock()

	item, ok := c.items[key]
	if !ok {
		return ""
	}
	if item.expire > 0 &&
		(time.Now().Unix()-item.created) >= item.expire {
		go c.Delete(key)
		return ""
	}
	return item.val
}
1037867
func (c *Scratch) Get(key string) interface{} {
	c.mu.RLock()
	val := c.values[key]
	c.mu.RUnlock()

	return val
}
222042
func (c *Cache) Get(key string) (resp []byte, ok bool) {
	item, err := c.Client.Get(cacheKey(key))
	if err != nil {
		return nil, false
	}
	return item.Value, true
}
1072878
func (c *Cache) Get(key string) (resp []byte, ok bool) {
	key = keyToFilename(key)
	resp, err := c.d.Read(key)
	if err != nil {
		return []byte{}, false
	}
	return resp, true
}
674622
func (smap *syncedMap) Get(key interface{}) (val interface{}, ok bool) {
	smap.RLock()
	defer smap.RUnlock()

	val, ok = smap.data[key]
	return
}
1030406
func (rc *Memcache) Get(key string) (interface{}, error) {
	val, err := rc.c.Get(Md5(key))
	if err != nil || val == nil {
		if err != nil && rc.Debug {
			log.Println("[Memcache]GetErr: ", err, "Key:", key)
		}
		return nil, err
	}

	var v interface{}
	err = Decode(val.Value, &v)
	if err != nil {
		if rc.Debug {
			log.Println("[Memcache]DecodeErr: ", err, "Key:", key)
		}
		return nil, err
	}

	if rc.Debug {
		log.Println("[Memcache]Get: ", key)
	}
	return v, err
}
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
}
243366
func (scope *ArgScope) Get(key string) (interface{}, error) {
	return scope.data[key], nil
}