Return the cache keys associated with an object.
501503
def get_object_cache_keys(instance):
    
    if not instance.pk or instance._state.adding:
        return []

    keys = []
    for language in _get_available_languages(instance):
        keys.append(get_urlfield_cache_key(instance.__class__, instance.pk, language))

    return keys
412080
function objectKeys(object) {
  if (Object.keys) {
    return Object.keys(object);
  }
  var result = [];

  angular.forEach(object, function(val, key) {
    result.push(key);
  });
  return result;
}
1213283
function objectKeys(obj) {
  if (!obj) { return null; }

  if (Object.keys) {
    return Object.keys(obj);
  }

  var out = [];

  for (var key in obj) {
    if (obj.hasOwnProperty(key)) {
      out.push(key);
    }
  }

  return out;
}
888205
def public_keys(self):
        """"""
        if not self.public_keys_cache:
            conn = self.conn_factory()
            self.public_keys_cache = conn.export_public_keys(self.identities)
        return self.public_keys_cache
262540
function getObjectWithStringifiedKeys(object) {
	return Object.keys(object).reduce((objectJSON, key) => {
		objectJSON[key] = String(object[key]);

		return objectJSON;
	}, {});
}
458635
public function get_wp_object_keys() {
		if ( isset( self::$memo[ get_called_class() ][ __METHOD__ ] ) ) {
			return self::$memo[ get_called_class() ][ __METHOD__ ];
		}

		$keys = array();

		foreach ( $this->get_attribute_keys() as $key ) {
			if ( $this->has_map_method( $key ) ) {
				$keys[] = $key;
			}
		}

		return self::$memo[ get_called_class() ][ __METHOD__ ] = $keys;
	}
1094319
def private_keys(self):
        """"""
        return dict([(a, e) for a, e in self.entries.items()
                     if isinstance(e, PrivateKeyEntry)])
391059
def cache_key(self, method_name):
        """"""
        key = ""
        method = getattr(self, "cache_key_{}".format(method_name), None)
        if method:
            key = method()

        return key
804942
def get_object_cache_keys(instance):
    
    if instance.pk is None or instance._state.adding:
        return []

    keys = []
    tr_models = instance._parler_meta.get_all_models()

    # TODO: performs a query to fetch the language codes. Store that in memcached too.
    for language in instance.get_available_languages():
        for tr_model in tr_models:
            keys.append(get_translation_cache_key(tr_model, instance.pk, language))

    return keys
523147
def get_cached_menus():
    """"""
    items = cache.get(CACHE_KEY)
    if items is None:
        menu = generate_menu()
        cache.set(CACHE_KEY, menu.items)
    else:
        menu = Menu(items)
    return menu
1299704
def get_keys(self):
        
        return [(self.first_key + i) for i in range(0, len(self.targets))]
733960
def keys(self, key=None, reverse=False):
        """"""
        ks = sorted(list(dict.keys(self)), key=key, reverse=reverse)
        return ks
712952
def get_keys(self):
        
        keys = []
        for section in self.get_sections():
            phase = self._sections[section]
            for obj in phase:
                keys += obj.get_id()
        keys.sort()
        return keys
98334
function keys(obj) {
    var keyList = [];
    for (var key in obj) {
        if (obj.hasOwnProperty(key)) {
            keyList.push(key);
        }
    }
    return keyList;
}
1165315
def iterkeys(obj):
    ""
    return iter(obj.keys()) if sys.version_info.major == 3 else obj.iterkeys()
1144032
def keys(self):
        
        for field in self._client.hkeys(self.key_prefix):
            yield self._decode(field)
265610
def get_properties(obj):
    
    if hasattr(obj, 'keys'):
        return obj.keys()
    elif hasattr(obj, '__dict__'):
        return obj.__dict__.keys()

    return []