migrateFrom method
Implementation
Future<void> migrateFrom(CacheInfoRepository previousRepository) async {
if (!await previousRepository.exists()) return;
await previousRepository.open();
final cacheObjects = await previousRepository.getAllObjects();
await _putAll(cacheObjects);
final isClosed = await previousRepository.close();
if (!isClosed) {
cacheLogger.log('Deleting an open repository while migrating.',
CacheManagerLogLevel.warning);
}
await previousRepository.deleteDataFile();
}