コード例 #1
0
        public FeatureToggleService(IFeatureToggleConfiguration configuration, ILogger <FeatureToggleService> logger)
        {
            var store = DynamoDBComponents.DynamoDBFeatureStore(configuration.TableName)
                        .WithCaching(FeatureStoreCacheConfig.Enabled.WithTtlSeconds(configuration.CacheDurationInSeconds));

            var ldConfig = new LaunchDarkly.Client.Configuration()
                           .WithFeatureStoreFactory(store).WithOffline(true);

            _ldClient = new LdClient(ldConfig);
            _logger   = logger;
        }