Retrieve a cached item
 Raises if key does not exist in cache

 Returns cached value
549401
def [](key)
      return @cache[key] if @cache.key?(key)

      path = path_to(hash(key))
      if disk_cache_enabled? && File.file?(path) && File.readable?(path)
        @cache[key] = load(path)
      else
        raise
      end
    end
594696
def __retrieve(self, key):
        ''' 
        '''
        with self.get_conn() as conn:
            try:
                c = conn.cursor()
                if key is None:
                    c.execute("SELECT value FROM cache_entries WHERE key IS NULL")
                else:
                    c.execute("SELECT value FROM cache_entries WHERE key = ?", (key,))
                result = c.fetchone()
                if result is None or len(result) != 1:
                    getLogger().info("There's no entry with key={key}".format(key=key))
                    return None
                else:
                    return result[0]
            except:
                getLogger().exception("Cannot retrieve")
                return None
984923
def get_item_key(self, item):
        """"""
        try:
            ret = item[item['key']]
        except KeyError:
            logger.error("No 'key' available in {}".format(item))
        if isinstance(ret, list):
            return ret[0]
        else:
            return ret
67842
def get(self, CachableItem):
        
        return self.session.\
                        query(self.mapper.factory().__class__).\
                        filter(self.mapper.factory().__class__.__dict__[self.mapper.key()]==CachableItem.getId()).\
                        first()
228210
function get (key) {
  return isExpired(key).then(hasExpired => {
    if (hasExpired) {
      return remove(key).then(() => Promise.resolve(undefined))
    } else {
      return storage.get(`${prefix}${key}`)
    }
  })
}
696997
function _get(key){
	var ret = null;

	// Pull from cache or re-read from fs.
	//console.log('key: ' + key)
	//console.log('use_zcache_p: ' + use_zcache_p)
	if( use_zcache_p ){
	    ret = zcache[key];
	}else{
	    ret = afs.read_file(path_cache[key]);
	}

	return ret;
    }
640790
def get(key)
      return nil if !@actions.has_key?(key)
      return @results_cache[key] if @results_cache.has_key?(key)
      @results_cache[key] = @actions[key].call
    end
881955
def get(self, object_type, cache_key):
        
        if object_type not in self.mapping or self.disabled:
            return None
        cache = self.mapping[object_type]
        if cache_key in cache:
            log.debug("Cache HIT: [%s %s]" % (object_type.capitalize(), cache_key))
            return cache[cache_key]
        else:
            log.debug('Cache MISS: [%s %s]' % (object_type.capitalize(), cache_key))
1003977
def get(self, key, no_cache=False):
        
        section, name = self.parse_lookup(key)
        preference = self.registry.get(
            section=section, name=name, fallback=False)
        if no_cache or not preferences_settings.ENABLE_CACHE:
            return self.get_db_pref(section=section, name=name).value

        try:
            return self.from_cache(section, name)
        except CachedValueNotFound:
            pass

        db_pref = self.get_db_pref(section=section, name=name)
        self.to_cache(db_pref)
        return db_pref.value
692923
def get(self, key=NOT_SET, index=NOT_SET, d=None):
		
		if index is NOT_SET and key is not NOT_SET:
			try:
				index, value = self._dict[key]
			except KeyError:
				return d
			else:
				return value
		elif index is not NOT_SET and key is NOT_SET:
			try:
				key, value = self._list[index]
			except IndexError:
				return d
			else:
				return value
		else:
			raise KEY_EQ_INDEX_ERROR
1122649
public T get(String key) {
        SoftReference<T> ref = cacheMap.get(key);
        if (ref != null) {
            if (ref.get() == null) {
                logger.debug("Cached item was cleared: " + key);
            }
            return ref.get(); //maybe still be null
        }

        return null;
    }
1356397
def get(self, key, bucket):
        

        try:
            return self._cache[bucket][key]
        except (KeyError, TypeError):
            return None
190990
def get_from_cache(key):
        

        try:
            value = cache.get(key)
            return json.loads(value), key if value else None
        except Exception as e:
            # todo should add log.error()
            return None
207227
def get_cached_response(self, key):
        
        cached_value = self.data.get(key, _CACHE_MISS)
        is_found = cached_value is not _CACHE_MISS
        return CachedResponse(is_found, key, cached_value)
368041
def get(self, item):
        
        if item not in self._item_cache:
            try:
                item = self.__getitem__(item)
            except KeyError:
                item = None
            self._item_cache[item] = item
        return self._item_cache[item]
417037
def get(self, key):
    
    if key not in self._keystore:
      return None

    rec = self._keystore[key]
    """:type rec InMemoryItemValue"""

    if rec.is_expired:
      self.delete(key)
      return None

    return rec.value
366647
def get_cached_value(self, *args, **kwargs):
        
        key = self.get_cache_key(*args, **kwargs)
        logger.debug(key)
        return self.cache.get(key, default=Ellipsis)