Returns cache entry parameter value by its name.

        :param str entry_name:
        :param str key:
        :param type default:
        :return:
970194
def _cache_get_entry(self, entry_name, key=ENTIRE_ENTRY_KEY, default=False):
        
        if key is self.ENTIRE_ENTRY_KEY:
            return self._cache[entry_name]
        return self._cache[entry_name].get(key, default)
936102
public String getParameterValue(String name, String defaultValue)
   {
      String value = defaultValue;
      SimpleParameterEntry p = parameters.get(name);
      if (p != null)
      {
         value = p.getValue();
      }
      return value;
   }
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
714454
def _get_cache_key(self, args, kwargs):
        
        hash_input = json.dumps({'name': self.name, 'args': args, 'kwargs': kwargs}, sort_keys=True)
        # md5 is used for internal caching, not need to care about security
        return hashlib.md5(hash_input).hexdigest()
1201082
def _structlog_default_keys_processor(logger_class, log_method, event):
    '''  '''
    global HOSTNAME

    if 'id' not in event:
        event['id'] = '%s_%s' % (
            datetime.utcnow().strftime('%Y%m%dT%H%M%S'),
            uuid.uuid1().hex
        )

    if 'type' not in event:
        event['type'] = 'log'

    event['host'] = HOSTNAME

    return event
1224174
def get_field_entry_key(node):
    # type: (Field) -> str
    """"""
    if node.alias:
        return node.alias.value
    return node.name.value
1009216
def _cache_key(self, attr_name):
        
        dn = self._ldap_user.dn
        return valid_cache_key(
            "auth_ldap.{}.{}.{}".format(self.__class__.__name__, attr_name, dn)
        )
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)
993499
def lookup_value(self, api_name, key):
        
        if api_name in self._cache:
            return self._cache[api_name].get(key, None)
        return None
194337
def getParameter(self, name):
        
        return lock_and_call(
            lambda: Parameter(self._impl.getParameter(name)),
            self._lock
        )
1046031
def cache_key(self):
        
        return '%s:%s' % (super(EntryPublishedVectorBuilder, self).cache_key,
                          Site.objects.get_current().pk)
797826
def _get_cache_value(self, key, empty, type):
        """"""
        if type is bool:
            return key in self
        if key in self:
            value = self[key]
            if value is None:
                return empty
            elif type is not None:
                try:
                    value = type(value)
                except ValueError:
                    pass
            return value
179780
def get(self, key, default=None, type_=None):
        
        try:
            rv = self[key]
        except KeyError:
            return default
        if type_ is not None:
            try:
                rv = type_(rv)
            except ValueError:
                rv = default
        return rv
229024
def get(self, key, default=None):
        
        try:
            val = self[key]
        except KeyError:
            val = default
        return val
365555
def getCachedOrUpdatedValue(self, key, channel=None):
        
        if channel:
            return self._hmchannels[channel].getCachedOrUpdatedValue(key)

        try:
            return self._VALUES[key]
        except KeyError:
            value = self._VALUES[key] = self.getValue(key)
            return value
148702
def cached(f):
    
    @functools.wraps(f)
    def wrapped(*args, **kwargs):
        with _cache_lock:
            identifier = (f.__name__,  args, kwargs)
            key = pickle.dumps(identifier)
            value = cache.get(key)
            if value is not None:
                logger.debug("HIT for %s -> %s" % (str(identifier), value))
            else:
                logger.debug("MISS for %s" % str(identifier))
                value = f(*args, **kwargs)
                cache[key] = value
            return value
    return wrapped
626691
def get_cache_key(bucket, name, args, kwargs):
    
    u = ''.join(map(str, (bucket, name, args, kwargs)))
    return 'native_tags.%s' % sha_constructor(u).hexdigest()