def METHOD_NAME(key=None, value=None, parent=None, name=None, parenttype=None):
	"""Clear a default value by any of the given parameters and delete caches.
	:param key: Default key.
	:param value: Default value.
	:param parent: User name, or `__global`, `__default`.
	:param name: Default ID.
	:param parenttype: Clear defaults table for a particular type e.g. **User**.
	"""
	filters = {}
	if name:
		filters.update({"name": name})
	else:
		if key:
			filters.update({"defkey": key})
		if value:
			filters.update({"defvalue": value})
		if parent:
			filters.update({"parent": parent})
		if parenttype:
			filters.update({"parenttype": parenttype})
	if parent:
		clear_defaults_cache(parent)
	else:
		clear_defaults_cache("__default")
		clear_defaults_cache("__global")
	if not filters:
		raise Exception("[clear_default] No key specified.")
	frappe.db.delete("DefaultValue", filters)
	_clear_cache(parent)