public async Task CreateStorage_SaveOption_ReadCache() { AutoCacheOptions.SaveAll = true; _autoCache = new CrudAutoCache <string, Guid>(_storage, ToGuid, Cache, null, AutoCacheOptions); var id = await _autoCache.CreateAsync("A"); // Will update cache thanks to SaveAll await PrepareStorageAsync(id, "B"); await VerifyAsync(id, "B", "A"); }
public async Task CreateStorage_ReadStorage() { var doGetToUpdate = false; while (true) { AutoCacheOptions.DoGetToUpdate = doGetToUpdate; var id = await _autoCache.CreateAsync("A"); // Will not update cache await PrepareStorageAsync(id, "B"); await VerifyAsync(id, "B", null, "B"); if (doGetToUpdate) { break; } doGetToUpdate = true; } }