private static void Initialize(string cacheServiceAddress, int maxCacheSize, int rollingExpiringWindowInMinutes) { cache = new bUtility.TokenCache.Implementation.DistributedSessionSecurityTokenCache( () => new PersistentLib.SqlServerFactory(cacheServiceAddress), () => bUtility.TokenCache.Extensions.GetSerializationSettings(), () => rollingExpiringWindowInMinutes); _internalCache = new RecentlyUsedSessionSecurityTokenCache(maxCacheSize); }
private static void Initialize(string cacheServiceAddress, int maxCacheSize, string applicationId, int servicePointConnectionLimit, int httpClientTimeoutMsecs) { _apiBaseUrl = cacheServiceAddress; _internalCache = new RecentlyUsedSessionSecurityTokenCache(maxCacheSize); ApplicationId = applicationId; _httpClient = HttpClientHelperAsync.CreateHttpClient(cacheServiceAddress, servicePointConnectionLimit, httpClientTimeoutMsecs); _httpClient.DefaultRequestHeaders.Clear(); _httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); }
private static void Initialize(string cacheServiceAddress, int maxCacheSize, string applicationId) { _apiBaseUrl = cacheServiceAddress; _internalCache = new RecentlyUsedSessionSecurityTokenCache(maxCacheSize); ApplicationId = applicationId; }