Retrieve an item from the cache by key.

        :param key: The cache key
        :type key: str

        :return: The cache value
513857
def get(self, key):
        
        value = self._redis.get(self._prefix + key)

        if value is not None:
            return self.unserialize(value)
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;
    }
1195786
def get(self, key, default=None):
        
        if not isinstance(key, bytes):
            key = key.encode('utf8')

        return self.b_get_value(key) or default
907538
def get_section(self, *key):
        
        section = self._get_item_or_section(key)
        if not section.is_section:
            raise RuntimeError('{} is an item, not a section'.format(key))
        return section
368234
def get(self, key, default=miss):
        """"""
        if key not in self._dict:
            return default

        # invokes __getitem__, which updates the item
        return self[key]
1077604
def Get(self,key):
		

		for template in self.templates:
			if template.id == key:  return(template)
1113490
def get(self, key):
        
        try:
            return self[self.id_lookup.get(key)]

        except TypeError:
            raise KeyError
449412
def get(self, key, default=None):
        
        result = self._loads(self._client.get(self.get_key(key)))
        if result is not None:
            return result
        else:
            return default or self._default
65587
def get(self, key):
        
        if key in self.cache:
            self.hits += 1
            return self.cache[key]
        self.misses += 1
        return None
2548
def get(self, key):
        
        return self._object_class(json.loads(self._db[key]))
419543
def get(self, key, default=None):
        
        try:
            index = self.__keys.index(str(key))
        except ValueError:
            return default
        if 0 <= index < len(self):
            return super(Record, self).__getitem__(index)
        else:
            return default
1256548
def retrieve(self, request):
        
        if request.method not in CACHE_VERBS:
            return
        try:
            response = self.data[request.url]['response']
            logger.info('Retrieved response from cache')
            return response
        except KeyError:
            return None
754188
def get(self, key: str, default: Any = DEFAULT):
        
        if default is self.DEFAULT:
            try:
                value = self.params.get(key)
            except KeyError:
                raise ConfigurationError("key \"{}\" is required at location \"{}\"".format(key, self.history))
        else:
            value = self.params.get(key, default)
        return self._check_is_dict(key, value)
735472
def get(self, key):
        
        keystr = str(key)
        res = None

        try:
            res = self.ctx[keystr]
        except KeyError:
            for k, v in self.ctx.items():
                if "name" in v and v["name"].lower() == keystr.lower():
                    res = v
                    break

        return res
449320
def get(self, key) -> str:
        
        # TODO: get is creating files when a key is given which is more than
        # the store size
        chunk_no, offset = self._get_key_location(key)
        with self._openChunk(chunk_no) as chunk:
            return chunk.get(str(offset))
943005
def hget(self, key):
        
        data = self.r.hget(self.hash, key)
        if data is not None and not isinstance(data, str):
            data = str(self.r.hget(self.hash, key), 'utf-8')
        return data
1354320
def get(self, key, getter_func):
        
        # Look in cache first.
        try:
            return self._data[key]
        except KeyError:
            # Not found? Get it.
            value = getter_func()
            self._data[key] = value
            self._keys.append(key)

            # Remove the oldest key when the size is exceeded.
            if len(self._data) > self.maxsize:
                key_to_remove = self._keys.popleft()
                if key_to_remove in self._data:
                    del self._data[key_to_remove]

            return value