private long CalculateExpiry(URLConnection urlConnection, long request_time, UrlConnectionExpiryCalculator urlConnectionExpiryCalculator)
			{
				if ("no-cache".Equals(urlConnection.GetHeaderField("Pragma")))
				{
					return 0L;
				}
				string cacheControl = urlConnection.GetHeaderField("Cache-Control");
				if (cacheControl != null)
				{
					if (cacheControl.IndexOf("no-cache") != -1)
					{
						return 0L;
					}
					int max_age = GetMaxAge(cacheControl);
					if (-1 != max_age)
					{
						long response_time = Runtime.CurrentTimeMillis();
						long apparent_age = Math.Max(0, response_time - urlConnection.GetDate());
						long corrected_received_age = Math.Max(apparent_age, urlConnection.GetHeaderFieldInt("Age", 0) * 1000L);
						long response_delay = response_time - request_time;
						long corrected_initial_age = corrected_received_age + response_delay;
						long creation_time = response_time - corrected_initial_age;
						return max_age * 1000L + creation_time;
					}
				}
				long explicitExpiry = urlConnection.GetHeaderFieldDate("Expires", -1L);
				if (explicitExpiry != -1L)
				{
					return explicitExpiry;
				}
				return urlConnectionExpiryCalculator == null ? 0L : urlConnectionExpiryCalculator.CalculateExpiry(urlConnection);
			}