public async Task UpdateStorage_ReadOldCache() { var id = Guid.NewGuid(); await PrepareStorageAndCacheAsync(id, "A", "A"); await _autoCache.UpdateAsync(id, "B"); // Will not update cache await VerifyAsync(id, "B", "A"); }
public async Task UpdateStorage_SaveOption_ReadCache() { AutoCacheOptions.SaveAll = true; _autoCache = new CrudAutoCache <string, Guid>(_storage, ToGuid, Cache, null, AutoCacheOptions); var id = Guid.NewGuid(); await PrepareStorageAndCacheAsync(id, "A", "A"); await _autoCache.UpdateAsync(id, "B"); // Will update cache thanks to SaveAll await PrepareStorageAsync(id, "C"); await VerifyAsync(id, "C", "B"); }