Aspectacular.CacheAspect.GetValueFromCacheIfItsThere C# (CSharp) Method

GetValueFromCacheIfItsThere() private method

private GetValueFromCacheIfItsThere ( ) : void
return void
        private void GetValueFromCacheIfItsThere()
        {
            string cacheKey = this.BuildMethodCacheKeyVerySlowly();

            object cachedValue;

            if (this.Cache2 != null)
                this.ValueFoundInCache = this.Cache2.TryGet(cacheKey, out cachedValue, this.Proxy);
            else
                this.ValueFoundInCache = this.Cache.TryGet(cacheKey, out cachedValue);

            this.LogInformationData("Found in cache", this.ValueFoundInCache);

            if(this.ValueFoundInCache)
            {
                if(cachedValue is Exception)
                    this.Proxy.MethodExecutionException = cachedValue as Exception;
                else
                    this.Proxy.ReturnedValue = cachedValue;

                this.Proxy.CancelInterceptedMethodCall = true;
            }
        }