Get an item from the cache, or store the default value forever.

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

        :param callback: The default function
        :type callback: mixed

        :rtype: mixed
12705
def remember_forever(self, key, callback):
        
        # If the item exists in the cache we will just return this immediately
        # otherwise we will execute the given callback and cache the result
        # of that execution forever.
        val = self.get(key)
        if val is not None:
            return val

        val = value(callback)

        self.forever(key, val)

        return val
1059207
public static function get($key, callable $callback = null, $fresh = false)
    {
        return self::getCache()->get($key, $callback, $fresh);
    }
452237
def cache_key(*args, **kwargs):
    
    key = ""
    for arg in args:
        if callable(arg):
            key += ":%s" % repr(arg)
        else:
            key += ":%s" % str(arg)

    return key
1273033
def get(self, key, default=_NoValue):
        
        self._checkType(key, "key")
        if default is _NoValue:
            return self._jconf.get(key)
        else:
            if default is not None:
                self._checkType(default, "default")
            return self._jconf.get(key, default)
245498
def get(self, item, default=None):
        
        if hasattr(self, item):
            return getattr(self, item)
        try:
            return self.__getitem__(item)

        except KeyError:
            return default
1040770
def restore_default(self, key):
        
        default = self.default_values[key]
        dict.__setitem__(self, key, default)
        if key not in self.defaults:
            self.defaults.append(key)
        return default
1251219
def get(self, key, default=None, with_age=False):
        "  "
        try:
            return self.__getitem__(key, with_age)
        except KeyError:
            if with_age:
                return default, None
            else:
                return default
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)
1364979
def get(self, key, default):
        """"""
        with self._lock:
            try:
                return self._dict[key].copy()
            except KeyError:
                return default
950583
def get(self, key, _else=None):
        
        with self._lock:
            self.expired()
            # see if everything expired
            try:
                value = self._dict[key].get()
                return value
            except KeyError:
                return _else
            except ValueError:
                return _else
927746
function cacheGet(key, options) {
    if (shouldCache(options)) {
      return;
    }

    if (self.options.cache === 'memory') {
      return self.cache[key];
    }

    return self.options.cache.get(key);
  }
340507
def get_item(key):
    """"""
    CACHED_KEY_FILE = os.path.join(CURRENT_DIR, key)

    try:
        return json.loads(open(CACHED_KEY_FILE, "rb").read().decode('UTF-8'))["_"]
    except (IOError, ValueError):
        return None
768019
def get(self, key):
    
    self._create_file_if_none_exists()
    with open(self.filename, 'rb') as file_object:
      cache_pickle = pickle.load(file_object)
      val = cache_pickle.get(key, None)
      return val
587140
def get(self, key, default=None):
        
        try:
            return self[key]
        except KeyError:
            return default or self._default
25582
def get(key, node=None, default=None):
    
    d = AppData.get_by_key(key)
    if d:
        data = utils.dict_dot(d)
        return data.get(node, default) if node else data
    return {}
1360558
public function rememberForever($key, Closure $callback)
	{
		// If the item exists in the cache we will just return this immediately
		// otherwise we will execute the given Closure and cache the result
		// of that execution for the given number of minutes. It's easy.
		if ($this->has($key)) return $this->get($key);

		$this->forever($key, $value = $callback());

		return $value;
	}
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