// Get will return our stored in-memory forex rates, if we have them.
966338
func (s *CacheService) Get(base string) *RatesStore {
	// Is our cache expired?
	if s.IsExpired(base) {
		return nil
	}

	// Use stored results.
	return cache[base]
}
317838
func (m *MemoryStorer) Get(key string) (value string, err error) {
	m.mut.RLock()
	session, ok := m.sessions[key]
	m.mut.RUnlock()
	if !ok {
		return "", errNoSession{}
	}

	return session.value, nil
}
119185
func (i Int32) Get() (int32, error) {
	if !i.Present() {
		var zero int32
		return zero, errors.New("value not present")
	}
	return *i.value, nil
}
364954
func (t *TxStructure) Get(key []byte) ([]byte, error) {
	ek := t.encodeStringDataKey(key)
	value, err := t.reader.Get(ek)
	if kv.ErrNotExist.Equal(err) {
		err = nil
	}
	return value, errors.Trace(err)
}
349137
func (i Int16) Get() (int16, error) {
	if !i.Present() {
		var zero int16
		return zero, errors.New("value not present")
	}
	return *i.value, nil
}
1125893
func (c *memoryCache) Get(key string) ([]byte, error) {
	c.RLock()
	defer c.RUnlock()

	cached, ok := c.cache[key]
	if ok {
		return cached, nil
	}

	return nil, nil
}
293996
func (cache *Cache) Get(key []byte) (value []byte, err error) {
	hashVal := hashFunc(key)
	segID := hashVal & segmentAndOpVal
	cache.locks[segID].Lock()
	value, _, err = cache.segments[segID].get(key, nil, hashVal)
	cache.locks[segID].Unlock()
	return
}
278141
func (store *Store) Get(ctx context.Context, key string, rate limiter.Rate) (limiter.Context, error) {
	key = fmt.Sprintf("%s:%s", store.Prefix, key)
	now := time.Now()

	count, expiration := store.cache.Increment(key, 1, rate.Period)

	lctx := common.GetContextFromState(now, rate, expiration, count)
	return lctx, nil
}
65561
func (r *MemoryTTL) Get(key string) (interface{}, error) {
	r.RLock()

	for !r.isValid(key) {
		r.RUnlock()
		// Need write lock to delete key, so need to unlock, relock and recheck
		r.Lock()
		if !r.isValid(key) {
			r.delete(key)
			r.Unlock()
			return nil, ErrNotFound
		}
		r.Unlock()
		// Could become invalid again in this window
		r.RLock()
	}

	defer r.RUnlock()

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

	return value, nil
}
598404
func (p *Generic) Get(sz int) interface{} {
	var c interface{}
	select {
	case c = <-p.pool:
	default:
		c = p.fn(sz)
	}

	return c
}
1284259
func (t *TSCache) Get(key string) (time.Time, bool) {
	t.mux.RLock()
	defer t.mux.RUnlock()
	ts, ok := t.table[key]
	return ts, ok
}
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
}
441781
func (lru *LRUCache) Get(key string) (v Value, ok bool) {
	lru.mu.Lock()
	defer lru.mu.Unlock()

	element := lru.table[key]
	if element == nil {
		return nil, false
	}
	lru.moveToFront(element)
	return element.Value.(*entry).value, true
}
408803
func (c *LFUCache) Get(key interface{}) (interface{}, error) {
	v, err := c.get(key, false)
	if err == KeyNotFoundError {
		return c.getWithLoader(key, true)
	}
	return v, err
}
320884
func (store *Store) Get(ctx context.Context, key string, rate limiter.Rate) (limiter.Context, error) {
	key = fmt.Sprintf("%s:%s", store.Prefix, key)
	now := time.Now()

	lctx := limiter.Context{}
	onWatch := func(rtx *libredis.Tx) error {

		created, err := store.doSetValue(rtx, key, rate.Period)
		if err != nil {
			return err
		}

		if created {
			expiration := now.Add(rate.Period)
			lctx = common.GetContextFromState(now, rate, expiration, 1)
			return nil
		}

		count, ttl, err := store.doUpdateValue(rtx, key, rate.Period)
		if err != nil {
			return err
		}

		expiration := now.Add(rate.Period)
		if ttl > 0 {
			expiration = now.Add(ttl)
		}

		lctx = common.GetContextFromState(now, rate, expiration, count)
		return nil
	}

	err := store.client.Watch(onWatch, key)
	if err != nil {
		err = errors.Wrapf(err, "limiter: cannot get value for %s", key)
		return limiter.Context{}, err
	}

	return lctx, nil
}
82109
func (mo *Mo) Get(str string, vars ...interface{}) string {
	// Sync read
	mo.RLock()
	defer mo.RUnlock()

	if mo.translations != nil {
		if _, ok := mo.translations[str]; ok {
			return Printf(mo.translations[str].Get(), vars...)
		}
	}

	// Return the same we received by default
	return Printf(str, vars...)
}
72933
func (c *MemoryCacher) Get(key string) interface{} {
	c.lock.RLock()
	defer c.lock.RUnlock()

	item, ok := c.items[key]
	if !ok {
		return nil
	}
	if item.hasExpired() {
		go c.Delete(key)
		return nil
	}
	return item.val
}