Exemplo n.º 1
0
 private static IConfiguration CreateDistributedToggleCollectionCacheConfiguration()
 {
     return(UnleashConfigurationBuilder.Create()
            .AddSection(
                "Caching:Distributed",
                ("ToggleCollectionKeyName", "Toggles"),
                ("ToggleCollectionKeyName", "Toggles"),
                ("EtagKeyName", "Etag"),
                ("EtagEntryOptions:AbsoluteExpiration", "12/31/9999 11:59:59.9999999 PM +00:00"),
                ("EtagEntryOptions:SlidingExpiration", "10675199.02:48:05.4775807"),
                ("EtagEntryOptions:AbsoluteExpirationRelativeToNow", "10675199.02:48:05.4775807"),
                ("ToggleCollectionEntryOptions:AbsoluteExpiration", "01/01/2100 00:00:00.0000000 AM +00:00"),
                ("ToggleCollectionEntryOptions:SlidingExpiration", "00:00:01"),
                ("ToggleCollectionEntryOptions:AbsoluteExpirationRelativeToNow", "00:00:01")
                )
            .Build());
 }
Exemplo n.º 2
0
 private static IConfiguration CreateMemoryToggleCollectionCacheConfiguration()
 {
     return(UnleashConfigurationBuilder.Create()
            .AddSection(
                "Caching:Memory",
                ("ToggleCollectionKeyName", "Toggles"),
                ("ToggleCollectionKeyName", "Toggles"),
                ("EtagKeyName", "Etag"),
                ("EtagEntryOptions:Priority", "High"),
                ("EtagEntryOptions:Size", "9223372036854775807"),
                ("EtagEntryOptions:AbsoluteExpiration", "12/31/9999 11:59:59.9999999 PM +00:00"),
                ("EtagEntryOptions:SlidingExpiration", "10675199.02:48:05.4775807"),
                ("EtagEntryOptions:AbsoluteExpirationRelativeToNow", "10675199.02:48:05.4775807"),
                ("ToggleCollectionEntryOptions:Priority", "Low"),
                ("ToggleCollectionEntryOptions:Size", "1024"),
                ("ToggleCollectionEntryOptions:AbsoluteExpiration", "01/01/2100 00:00:00.0000000 AM +00:00"),
                ("ToggleCollectionEntryOptions:SlidingExpiration", "00:00:01"),
                ("ToggleCollectionEntryOptions:AbsoluteExpirationRelativeToNow", "00:00:01")
                )
            .Build());
 }