From a17670cbf95957248eb4077065ba1a890b09bf79 Mon Sep 17 00:00:00 2001 From: Bill Stoddard Date: Sat, 23 Feb 2002 19:31:02 +0000 Subject: [PATCH] Fix problem where expiry time was being set in the past when the cache was loaded. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93551 13f79535-47bb-0310-9956-ffa450edef68 --- modules/experimental/mod_cache.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/modules/experimental/mod_cache.c b/modules/experimental/mod_cache.c index 80c39a010a..f8e3700d5b 100644 --- a/modules/experimental/mod_cache.c +++ b/modules/experimental/mod_cache.c @@ -696,11 +696,10 @@ static int cache_in_filter(ap_filter_t *f, apr_bucket_brigade *in) "cache: Expiry date is %ld", (long)exp); if (exp == APR_DATE_BAD) { if (lastmod != APR_DATE_BAD) { - double x = (double) (date - lastmod) * conf->factor; - double maxex = (double)conf->maxex; - if (x > maxex) - x = maxex; - exp = now + (int) x; + apr_time_t x = (apr_time_t) ((date - lastmod) * conf->factor); + if (x > conf->maxex) + x = conf->maxex; + exp = now + x; } else exp = now + conf->defex; -- 2.40.0