// GetFullCache will return the full content of a Cache if it s available and not outdated
767499
func (a *AssetsCache) GetFullCache(key *AssetCacheKey) ([]byte, error) {
	cache := a.readFromCache(key)
	if cache == nil || cache.FullContent == nil {
		return nil, nil
	}
	graph := dependencygraph.Graph{}
	_, err := graph.Walk(key.AssetPath, func(curPath, parentPath string, g *dependencygraph.Graph) error {
		curKey, err := a.GenerateCacheKey(curPath)
		if err != nil {
			return err
		}
		if curKey.Key > cache.LastWrite {
			return errMustRebuildCache
		}
		curCache := a.readFromCache(curKey)
		if curCache == nil {
			return errMustRebuildCache
		}
		for _, r := range curCache.Requires {
			requiredFiles, lastModified, err := r.GetList(curCache.ExtInfo)
			if err != nil {
				return err
			}
			if lastModified > cache.LastWrite {
				return errMustRebuildCache
			}
			selfIndex := sort.SearchStrings(requiredFiles, curPath)
			if selfIndex < len(requiredFiles) && requiredFiles[selfIndex] == curPath {
				requiredFiles = append(requiredFiles[:selfIndex], requiredFiles[selfIndex+1:]...)
			}
			g.AddChildrens(curPath, requiredFiles...)
		}
		return nil
	})
	if err == errMustRebuildCache {
		return nil, nil
	}
	if err != nil {
		return nil, err
	}
	return cache.FullContent, 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
}
588447
func (c *Cache) Get(key interface{}) (value interface{}, ok bool) {
	c.lock.Lock()
	value, ok = c.lru.Get(key)
	c.lock.Unlock()
	return value, ok
}
165906
func (spec LookupInSpec) GetFull(opts *LookupInSpecGetFullOptions) LookupInOp {
	op := gocbcore.SubDocOp{
		Op:    gocbcore.SubDocOpGetDoc,
		Flags: gocbcore.SubdocFlag(SubdocFlagNone),
	}

	return LookupInOp{op: op}
}
276623
func (c *LruCache) Get(key string) ([]byte, bool) {
	c.mu.Lock()

	le, ok := c.cache[key]
	if !ok {
		c.mu.Unlock() // Avoiding defer overhead
		return nil, false
	}

	if c.MaxAge > 0 && le.Value.(*entry).expires <= time.Now().Unix() {
		c.deleteElement(le)
		c.maybeDeleteOldest()

		c.mu.Unlock() // Avoiding defer overhead
		return nil, false
	}

	c.lru.MoveToBack(le)
	value := le.Value.(*entry).value

	c.mu.Unlock() // Avoiding defer overhead
	return value, true
}
149815
func (cache *ReverseProxyCache) Get(hostAddress, privateAddress string, useTLS bool) (*httputil.ReverseProxy, bool) {
	cache.mu.RLock()
	defer cache.mu.RUnlock()
	key := ReverseProxyKey{
		HostAddress: hostAddress,
		PrivateAddress: privateAddress,
		UseTLS:  useTLS,
	}
	rp, ok := cache.data[key]
	return rp, ok
}
580121
func (s *memcachedStorage) Get(key string) (interface{}, error) {
	memcachedItem, err := s.c.Get(key)
	if err != nil && err.Error() == "memcache: cache miss" {
		return nil, ErrCacheItemNotFound
	}

	if err != nil {
		return nil, err
	}

	item := &cachedItem{}

	err = decodeGob(memcachedItem.Value, item)
	if err != nil {
		return nil, err
	}

	return item.Val, nil
}
105400
func (c *Cache) Get(ctx context.Context, key interface{}) (interface{}, bool) {
	now := clock.Now(ctx)

	// We need a Read/Write lock here because if the entry is present, we are
	// going to need to promote it "lru".
	c.lock.Lock()
	defer c.lock.Unlock()

	if e := c.cache[key]; e != nil {
		ent := e.Value.(*cacheEntry)
		if !c.isEntryExpired(now, ent) {
			c.lru.MoveToFront(e)
			return ent.v, true
		}
		c.evictEntryLocked(e)
	}

	return nil, false
}
1245371
func (t *Template) GetAllAWSElastiCacheCacheClusterResources() map[string]*resources.AWSElastiCacheCacheCluster {
	results := map[string]*resources.AWSElastiCacheCacheCluster{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case *resources.AWSElastiCacheCacheCluster:
			results[name] = resource
		}
	}
	return results
}
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
}
446393
func (c *LRUCache) Get(key Key) (value interface{}, ok bool) {
	defer c.mutex.Unlock()
	c.mutex.Lock()

	if ele, hit := c.cache[key]; hit {
		entry := ele.Value.(*cacheRecord)

		// If the entry has expired, remove it from the cache
		if entry.expireAt != nil && entry.expireAt.Before(time.Now().UTC()) {
			c.removeElement(ele)
			c.stats.Miss++
			return
		}
		c.stats.Hit++
		c.ll.MoveToFront(ele)
		return entry.value, true
	}
	c.stats.Miss++
	return
}
1238073
func (u *unfinishedNodes) get() *builderNodeUnfinished {
	if len(u.stack) < len(u.cache) {
		return &u.cache[len(u.stack)]
	}
	// full now allocate a new one
	return &builderNodeUnfinished{}
}
539708
func (k *KeyCacheStandard) GetTLFCryptKey(tlf tlf.ID, keyGen kbfsmd.KeyGen) (
	kbfscrypto.TLFCryptKey, error) {
	cacheKey := keyCacheKey{tlf, keyGen}
	if entry, ok := k.lru.Get(cacheKey); ok {
		if key, ok := entry.(kbfscrypto.TLFCryptKey); ok {
			return key, nil
		}
		// shouldn't really be possible
		return kbfscrypto.TLFCryptKey{}, KeyCacheHitError{tlf, keyGen}
	}
	return kbfscrypto.TLFCryptKey{}, KeyCacheMissError{tlf, keyGen}
}
397356
func (c *LRUExpireCache) Get(key interface{}) (interface{}, bool) {
	c.lock.Lock()
	defer c.lock.Unlock()
	e, ok := c.cache.Get(key)
	if !ok {
		return nil, false
	}
	if c.clock.Now().After(e.(*cacheEntry).expireTime) {
		c.cache.Remove(key)
		return nil, false
	}
	return e.(*cacheEntry).value, true
}
1009044
func GetFullName(schema Schema) string {
	switch sch := schema.(type) {
	case *RecordSchema:
		return getFullName(sch.GetName(), sch.Namespace)
	case *EnumSchema:
		return getFullName(sch.GetName(), sch.Namespace)
	case *FixedSchema:
		return getFullName(sch.GetName(), sch.Namespace)
	default:
		return schema.GetName()
	}
}
1106859
func (c *ReactionsGetCall) Full(full bool) *ReactionsGetCall {
	c.full = full
	return c
}
102852
func (g *NamespaceGetter) Get(key uint64, setFunc func() (size int, value Value)) *Handle {
	return g.Cache.Get(g.NS, key, setFunc)
}