public async Task RefreshAsync() { var refreshTime = DateTimeOffset.UtcNow; var latestFlags = await _storage.GetAsync(); _latestFlags = new FeatureFlagsAndRefreshTime(latestFlags, refreshTime); }
public FeatureFlagCacheService( IFeatureFlagStorageService storage, FeatureFlagOptions options, IFeatureFlagTelemetryService telemetryService, ILogger <FeatureFlagCacheService> logger) { _storage = storage ?? throw new ArgumentNullException(nameof(storage)); _options = options ?? throw new ArgumentNullException(nameof(options)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _telemetryServiceOrNull = telemetryService; _latestFlags = null; }