# MI_LoadCache

## Syntax

  `#include <nitro/mi.h>
  void MI_LoadCache(MICache *cache, MIDevice *device);`

## Arguments

cache | Pointer to the `MICache` structure to access. The cache must have been initialized using `MI_InitCache()`.
device | Pointer to the `MIDevice` structure that indicates the device to load. The device must have been initialized using `MI_InitDevice()`.

## Return Values

None.

## Description

Loads data from the device for all pages waiting to be loaded on the cache page list. From within this function, `MI_ReadDevice()` is called and the page will be in the loaded state. `MI_ReadCache()`, which failed previously after called, will succeed when it is called the next time.

This function is thread-safe. Other threads can use it even while `MI_ReadCache()` is being called.

Use `MI_IsCacheLoading()` in order to determine whether there are any pages waiting to be loaded.
The application must call this function at the appropriate time to load pages waiting to be loaded. If there are no pages waiting to be loaded, this function will do nothing when it is called.

This feature is a utility that enables efficient read access to devices. For more information, see the reference for the `MICache` structure.

## See Also

`MI_InitCache MI_ReadCache MI_IsCacheLoading
MICache`

## Revision History

2007/05/16 Initial version.

CONFIDENTIAL