MCO_RET mco_disk_load_cache( /*IN*/ mco_db_h db, /*IN*/ char const* file_path );
db | The database handle that was established by mco_db_connect() |
file_path |
The path to the file where the cache image is saved |
This function loads the previously saved state of the Disk Manager cache from persistent media.
MCO_S_OK | Cache image successfully saved |
MCO_E_DISK_OPEN |
Error opening/creating file on persistent storage device |
MCO_E_DISK_READ |
Error reading from persistent storage device |
MCO_E_DISK_CLOSE |
Error closing persistent storage device |
Application snippet: const char * dbname = "SimpleDb"; int main(int argc, char* argv[]) { mco_db_h db; MCO_RET rc; mco_device_t dev[4]; mco_db_params_t db_params; char * file_path = "c:\temp\backup\cache.sav"; ... rc = mco_db_open_dev( dbname, simple_get_dictionary(), dev, 4, &db_params ); if ( MCO_S_OK != rc ) { rc = mco_db_connect( dbname, &db ); ... rc = mco_disk_load_cache( db, file_path); ... } }