Get an entry from the cache by key.

        @raise KeyError: if the given key is not present in the cache.

        @raise CacheFault: (a L{KeyError} subclass) if the given key is present
            in the cache, but the value it points to is gone.
971727
def get(self, key):
        
        o = self.data[key]()
        if o is None:
            # On CPython, the weakref callback will always(?) run before any
            # other code has a chance to observe that the weakref is broken;
            # and since the callback removes the item from the dict, this
            # branch of code should never run. However, on PyPy (and possibly
            # other Python implementations), the weakref callback does not run
            # immediately, thus we may be able to observe this intermediate
            # state. Should this occur, we remove the dict item ourselves,
            # and raise CacheFault (which is a KeyError subclass).
            del self.data[key]
            raise CacheFault(
                "FinalizingCache has %r but its value is no more." % (key,))
        log.msg(interface=iaxiom.IStatEvent, stat_cache_hits=1, key=key)
        return o
390493
public V get(K key)
  {
    Entry<V> entry = _cache.get(key);

    if (entry == null)
      return null;

    if (entry.isValid())
      return entry.getValue();
    else {
      _cache.remove(key);

      return null;
    }
  }
1060402
def get(self, key, *val):
        
        data = self.get_data()
        if data is not None:
            return data.get(key, *val)
        if val:
            return val[0]
        raise KeyError(key)
1028170
def get_entry(key):
    
    if type(key) != str:
        raise TypeError("key must be str")
    if key not in _config:
        raise KeyError("Nonexistent entry '{key}'".format(key=key))
    return _config[key]
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
1221024
def get(self, key, timeout=None):
        """"""
        key = self.pre_identifier + key
        # Check to see if we have this key
        unpickled_entry = self.client.get(key)
        if not unpickled_entry:
            # No hit, return nothing
            return None

        entry = pickle.loads(unpickled_entry)
        # Use provided timeout in arguments if provided
        # otherwise use the one provided during init.
        if timeout is None:
            timeout = self.timeout

        # Make sure entry is not expired
        if self._is_expired(entry, timeout):
            # entry expired, delete and return nothing
            self.delete_entry(key)
            return None
        # entry found and not expired, return it
        return entry[1]
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
617528
def key(self, *args, _prefix=None, **kwargs):
        
        if kwargs:
            raise NotImplementedError(
                'kwarg cache keys not implemented')
        return (_prefix,) + tuple(args)
993499
def lookup_value(self, api_name, key):
        
        if api_name in self._cache:
            return self._cache[api_name].get(key, None)
        return None
625003
def _get_code(self, key):
        

        data = self.grid.code_array(key)
        self.grid.code_array.result_cache.clear()

        return data
406475
def get(key, adapter = MemoryAdapter):
	'''
	
	'''
	try:
		return pickle.loads(adapter().get(key))
	except CacheExpiredException:
		return None
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
1112258
def get(self, key):
    '''
    '''
    value = self.cache_datastore.get(key)
    return value if value is not None else self.child_datastore.get(key)
1070468
def get(key)
      return nil if !@items.key?(key)
      return @results_cache[key] if @results_cache.key?(key)
      @results_cache[key] = @items[key].call
    end
189989
def get(self, key, default_val=None, require_value=False):
        
        val = dict.get(self, key, default_val)
        if val is None and require_value:
            raise KeyError('key "%s" not found' % key)
        if isinstance(val, dict):
            return AttributeDict(val)
        return val
914861
def get(self, key):
        

        if not key in self._actions:
            return None
        if not key in self._cache:
            self._cache[key] = self._actions[key]()

        return self._cache[key]
464264
def get(self, key):
        
        mice = super().get(key)

        if mice is not None:  # Hit
            return mice

        # Try and get the key from the parent cache.
        if self.parent_subsystem_hash:
            parent_key = key.replace(str(self.subsystem_hash),
                                     str(self.parent_subsystem_hash), 1)
            mice = super().get(parent_key)

            if mice is not None and not mice.damaged_by_cut(self.subsystem):
                return mice

        return None