System.Net.Cache.HttpRequestCacheValidator.ValidateFreshness C# (CSharp) Method

ValidateFreshness() protected method

protected ValidateFreshness ( ) : CacheFreshnessStatus
return CacheFreshnessStatus
        protected internal override CacheFreshnessStatus ValidateFreshness()
        {

            // Transfer cache entry metadata into status line and headers.
            string s = ParseStatusLine();

            if(Logging.On) {
                if ((int) CacheStatusCode == 0) {
                    Logging.PrintError(Logging.RequestCache, SR.GetString(SR.net_log_cache_http_status_parse_failure, (s == null ? "null" : s)));
                }
                else {
                    Logging.PrintInfo(Logging.RequestCache, SR.GetString(SR.net_log_cache_http_status_line, (CacheHttpVersion != null ? CacheHttpVersion.ToString() : "null"), (int)CacheStatusCode, CacheStatusDescription));
                }

            }

            CreateCacheHeaders((int)CacheStatusCode != 0);
            CreateSystemMeta();

            // We will need quick access to cache-control and other headers coming with the cached item
            FetchHeaderValues(true);

            if(Logging.On) Logging.PrintInfo(Logging.RequestCache, SR.GetString(SR.net_log_cache_cache_control, CacheCacheControl.ToString()));

            // Now we try to apply our best knowledge of HTTP caching and return the result
            // that can be hooked up and revised on the upper level
            return Rfc2616.OnValidateFreshness(this);
        }