Beispiel #1
0
        } //end SetCacheKey()

        private HttpStatusCode GetCachedResponseStatusCode(ServiceConsumptionOptions serviceConsumptionOptions, out bool found)
        {
            found = false;

            var statusCodeKey = _cacheKey + StatusCodeCacheKeyPostFix;

            if (!ServiceCacheProvider.Contains(statusCodeKey))
            {
                return(default);
        private void SetCacheKey(ServiceConsumptionOptions serviceConsumptionOptions)
        {
            _cacheKeyGenerator = new GenericCacheKeyGenerator(serviceConsumptionOptions)
            {
                CachePerUser = (serviceConsumptionOptions as ServiceConsumptionOptions).CachePerUser,
                ApiName      = (serviceConsumptionOptions as ServiceConsumptionOptions).ApiName
            };

            _cacheKey = _cacheKeyGenerator.MakeCacheKey();
        } //end SetCacheKey()
Beispiel #3
0
        private void SetCacheKey(ServiceConsumptionOptions serviceConsumptionOptions)
        {
            _cacheKeyGenerator = new ExternalServiceCacheKeyGenerator(ServiceLocator.Current.GetInstance <ICacheKeyHasher>())
            {
                CachePerUser = (serviceConsumptionOptions as ServiceConsumptionOptions).CachePerUser,
                ApiName      = (serviceConsumptionOptions as ServiceConsumptionOptions).ApiName
            };

            _cacheKeyGenerator.SetServiceOptions(serviceConsumptionOptions);
            _cacheKey = _cacheKeyGenerator.MakeCacheKey();
        } //end SetCacheKey()