### Virtual Method

# Camel Folder get_message_cached

since: 3.24

#### Declaration [src]

    CamelMimeMessage*
    get_message_cached (
      CamelFolder* folder,
      const gchar* message_uid,
      GCancellable* cancellable
    )

#### Description [src]

Gets the message corresponding to `message_uid` from the `folder` cache, if available locally. This should not do any network I/O, only check if message is already downloaded and return it quickly, not being blocked by the folder’s lock. Returning NULL is not considered as an error, it just means that the message is still to-be-downloaded.

Note: This function is called automatically within camel_folder_get_message_sync().

Available since: 3.24

#### Parameters

`message_uid`

  Type: `const gchar*`

  The message UID.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`cancellable`

  Type: `GCancellable`

  Optional `GCancellable` object, or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.

#### Return value

Type: `CamelMimeMessage`

A cached `CamelMimeMessage` corresponding to the requested UID.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.
The return value can be `NULL`.