//
//
//
private void ValidateFreshness(RequestCacheEntry fetchEntry)
{
_Validator.FetchCacheEntry(fetchEntry);
if (_Validator.CacheStream == null || _Validator.CacheStream == Stream.Null)
{
if (Logging.On)
{
Logging.PrintInfo(Logging.RequestCache, SR.GetString(SR.net_log_cache_entry_not_found_freshness_undefined, "ValidateFreshness()"));
}
_Validator.SetFreshnessStatus(CacheFreshnessStatus.Undefined);
return;
}
if (Logging.On)
{
if (Logging.IsVerbose(Logging.RequestCache))
{
Logging.PrintInfo(Logging.RequestCache, SR.GetString(SR.net_log_cache_dumping_cache_context));
if (fetchEntry == null)
{
Logging.PrintInfo(Logging.RequestCache, "<null>");
}
else
{
string[] context = fetchEntry.ToString(Logging.IsVerbose(Logging.RequestCache)).Split(RequestCache.LineSplits);
for (int i = 0; i < context.Length; ++i)
{
if (context[i].Length != 0)
{
Logging.PrintInfo(Logging.RequestCache, context[i]);
}
}
}
}
}
CacheFreshnessStatus result = _Validator.ValidateFreshness();
_Validator.SetFreshnessStatus(result);
_IsCacheFresh = result == CacheFreshnessStatus.Fresh;
if (Logging.On)
{
Logging.PrintInfo(Logging.RequestCache, SR.GetString(SR.net_log_cache_result, "ValidateFreshness()", result.ToString()));
}
}