+ enable_caching = TRUE;
+}
+
+/**
+ * atspi_accessible_clear_cache:
+ * @obj: The #AtspiAccessible whose cache to clear.
+ *
+ * Clears the cached information for the given accessible and all of its
+ * descendants.
+ */
+void
+atspi_accessible_clear_cache (AtspiAccessible *obj)
+{
+ gint i;
+
+ if (obj)
+ {
+ obj->cached_properties = ATSPI_CACHE_NONE;
+ if (obj->children)
+ for (i = 0; i < obj->children->len; i++)
+ atspi_accessible_clear_cache (g_ptr_array_index (obj->children, i));
+ }
+}
+
+/**
+ * atspi_accessible_get_process_id:
+ * @accessible: The #AtspiAccessible to query.
+ * @error: a pointer to a %NULL #GError pointer
+ *
+ * Returns the process id associated with the given accessible. Mainly
+ * added for debugging; it is a shortcut to explicitly querying the
+ * accessible's app->bus_name and then calling GetConnectionUnixProcessID.
+ *
+ * Returns: The process ID or undetermined value if @error is set.
+ **/
+guint
+atspi_accessible_get_process_id (AtspiAccessible *accessible, GError **error)
+{
+ DBusMessage *message, *reply;
+ DBusConnection *bus = _atspi_bus ();
+ dbus_uint32_t pid = -1;
+ DBusError d_error;
+
+ if (!accessible->parent.app || !accessible->parent.app->bus_name)
+ {
+ g_set_error_literal(error, ATSPI_ERROR, ATSPI_ERROR_IPC, "Process is defunct");
+ return -1;
+ }
+
+ message = dbus_message_new_method_call ("org.freedesktop.DBus",
+ "/org/freedesktop/DBus",
+ "org.freedesktop.DBus",
+ "GetConnectionUnixProcessID");
+ dbus_message_append_args (message, DBUS_TYPE_STRING,
+ &accessible->parent.app->bus_name,
+ DBUS_TYPE_INVALID);
+ dbus_error_init (&d_error);
+ reply = dbus_connection_send_with_reply_and_block (bus, message, -1, &d_error);
+ dbus_message_unref (message);
+ if (reply)
+ {
+ if (!strcmp (dbus_message_get_signature (reply), "u"))
+ dbus_message_get_args (reply, NULL, DBUS_TYPE_UINT32, &pid, DBUS_TYPE_INVALID);
+ dbus_message_unref (reply);
+ }
+ if (dbus_error_is_set (&d_error))
+ {
+ g_set_error_literal(error, ATSPI_ERROR, ATSPI_ERROR_IPC, "Process is defunct");
+ dbus_error_free (&d_error);
+ }
+ return pid;