From 45fdd72155da9efe12187942534db53596b3ed9a Mon Sep 17 00:00:00 2001 From: Justin Erenkrantz Date: Wed, 19 Jan 2005 00:19:58 +0000 Subject: [PATCH] mod_cache: Remove unimplemented CacheForceCompletion directive. * modules/cache/mod_cache.h: Remove DEFAULT_CACHE_COMPLETION #define and complete-related vars. * modules/cache/mod_cache.c: Ditto. * modules/cache/mod_disk_cache.c: Clarify error message; remove unused complete var (unrelated to CacheForceCompletion removal). * docs/manual/mod/mod_cache.xml.ja, docs/manual/mod/mod_cache.xml.ko, docs/manual/mod/mod_cache.xml: Remove references to CacheForceCompletion. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@125573 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 3 +++ docs/manual/mod/mod_cache.xml | 33 -------------------------------- docs/manual/mod/mod_cache.xml.ja | 31 ------------------------------ docs/manual/mod/mod_cache.xml.ko | 30 ----------------------------- modules/cache/mod_cache.c | 26 ------------------------- modules/cache/mod_cache.h | 4 ---- modules/cache/mod_disk_cache.c | 5 +---- 7 files changed, 4 insertions(+), 128 deletions(-) diff --git a/CHANGES b/CHANGES index aba471b2c6..4ed67c8660 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,9 @@ Changes with Apache 2.1.3 [Remove entries to the current 2.0 section below, when backported] + *) mod_cache: Remove unimplemented CacheForceCompletion directive. + [Justin Erenkrantz] + *) support/check_forensic: Fix temp file usage [Javier Fernandez-Sanguino Pen~a ] diff --git a/docs/manual/mod/mod_cache.xml b/docs/manual/mod/mod_cache.xml index 8fabace26d..46fcbc0d5a 100644 --- a/docs/manual/mod/mod_cache.xml +++ b/docs/manual/mod/mod_cache.xml @@ -290,39 +290,6 @@ LastModified date. - -CacheForceCompletion -Percentage of document served, after which the server -will complete caching the file even if the request is cancelled. -CacheForceCompletion Percentage -CacheForceCompletion 60 -server configvirtual host - - - -

Ordinarily, if a request is cancelled while the response is being - cached and delivered to the client the processing of the response will - stop and the cache entry will be removed. The - CacheForceCompletion directive specifies a - threshold beyond which the document will continue to be cached to - completion, even if the request is cancelled.

- -

The threshold is a percentage specified as a value between - 1 and 100. A value of 0 - specifies that the default be used. A value of 100 - will only cache documents that are served in their entirety. A value - between 60 and 90 is recommended.

- - - CacheForceCompletion 80 - - - Note: - This feature is currently not implemented. - -
-
- CacheIgnoreHeaders Do not store the given HTTP header(s) in the cache. diff --git a/docs/manual/mod/mod_cache.xml.ja b/docs/manual/mod/mod_cache.xml.ja index db4e244172..e1b0437d2e 100644 --- a/docs/manual/mod/mod_cache.xml.ja +++ b/docs/manual/mod/mod_cache.xml.ja @@ -296,37 +296,6 @@ - -CacheForceCompletion -$B%j%/%(%9%H$,%-%c%s%;%k$5$l$F$b%-%c%C%7%e$r40N;$9$k$+$I$&$+$r(B -$B7h$a$kAw$i$l$?%I%-%e%a%s%H$N3d9g$r;XDj$9$k!#(B -CacheForceCompletion Percentage -CacheForceCompletion 60 -server configvirtual host - - - -

$BDL>o!"1~Ez$,%-%c%C%7%e$5$l$F%/%i%$%"%s%H$KAw$i$l$F$$$k:GCf$K(B - $B%j%/%(%9%H$,%-%c%s%;%k$5$l$k$H!"1~Ez$N=hM}$OCf;_$5$l$F!"%-%c%C%7%e$N(B - $B%(%s%H%j$b:o=|$5$l$^$9!#(BCacheForceCompletion - $B%G%#%l%/%F%#%V$O!"%j%/%(%9%H$,%-%c%s%;%k$5$l$F$b!"%-%c%C%7%e=hM}$r(B - $B40N;$^$GB3$1$k$+$I$&$+$N$7$-$$CM$r;XDj$7$^$9!#(B

- -

$B$7$-$$CM$O(B 1 $B$H(B 100 $B$N4V$G;XDj$9$k(B - $B3d9g$G$9!#(B0 $B$G$O%G%U%)%k%H$,;H$o$l$^$9!#(B - 100 $B$G$O!"40A4$KAw?.$,40N;$7$?%I%-%e%a%s%H$N$_$r(B - $B%-%c%C%7%e$7$^$9!#(B60 $B$+$i(B 90 $B$N4V$NCM$,?d>)CM$G$9!#(B

- - - CacheForceCompletion 80 - - - $BCm(B: - $B$3$N5!G=$O8=;~E@$G$O$B$$$^$;$s(B$B!#(B - -
-
- CacheIgnoreHeaders $B;XDj$5$l$?(B HTTP $B%X%C%@$r%-%c%C%7%e$KJ]B8$7$J$$!#(B diff --git a/docs/manual/mod/mod_cache.xml.ko b/docs/manual/mod/mod_cache.xml.ko index 6d90b80554..7ff18d6738 100644 --- a/docs/manual/mod/mod_cache.xml.ko +++ b/docs/manual/mod/mod_cache.xml.ko @@ -291,36 +291,6 @@ - -CacheForceCompletion -¿äûÀÌ Ãë¼ÒµÇ´õ¶óµµ ¼­¹ö°¡ ÆÄÀÏÀ» °è¼Ó ij½¬ÇϱâÀ§ÇØ -ÇÊ¿äÇÑ ¹®¼­ÀÇ ¼­ºñ½º·ü. -CacheForceCompletion Percentage -CacheForceCompletion 60 -server configvirtual host - - - -

º¸Åë ÀÀ´äÀ» ij½¬ÇÏ°í Ŭ¶óÀ̾ðÆ®·Î º¸³»´Â µµÁß¿¡ ¿äûÀÌ - Ãë¼ÒµÇ¸é ÀÀ´ä 󸮸¦ Áߴܵǰí ij½¬ Ç׸ñÀ» Áö¿î´Ù. - CacheForceCompletion Áö½Ã¾î´Â ¿äûÀÌ - Ãë¼ÒµÇ´õ¶óµµ ¹®¼­¸¦ °è¼Ó ij½¬ÇÒ Á¤µµ¸¦ ÁöÁ¤ÇÑ´Ù.

- -

Á¤µµ´Â ¹éºÐÀ²·Î ³ªÅ¸³»¸ç 1°ú 100 - »çÀÌÀÇ °ªÀÌ´Ù. 0 °ªÀ» ÁöÁ¤ÇÏ¸é ±âº»°ªÀ» »ç¿ëÇÑ´Ù. - 100Àº ³»¿ëÀ» ¸ðµÎ ¼­ºñ½ºÇÑ ¹®¼­¸¸À» ij½¬ÇÑ´Ù. - 60°ú 90 »çÀÌÀÇ °ªÀ» ÃßõÇÑ´Ù.

- - - CacheForceCompletion 80 - - - ÁÖÀÇ: - ÀÌ ±â´ÉÀº ÇöÀç ±¸ÇöµÇÁö ¾Ê¾Ò´Ù. - -
-
- CacheIgnoreHeaders ij½¬¿¡ ÁöÁ¤ÇÑ HTTP Çì´õ(µé)¸¦ ÀúÀåÇÏÁö ¾Ê´Â´Ù diff --git a/modules/cache/mod_cache.c b/modules/cache/mod_cache.c index 0a2f67cb5b..335ab81585 100644 --- a/modules/cache/mod_cache.c +++ b/modules/cache/mod_cache.c @@ -702,9 +702,6 @@ static void * create_cache_config(apr_pool_t *p, server_rec *s) /* factor used to estimate Expires date from LastModified date */ ps->factor = DEFAULT_CACHE_LMFACTOR; ps->factor_set = 0; - /* default percentage to force cache completion */ - ps->complete = DEFAULT_CACHE_COMPLETION; - ps->complete_set = 0; ps->no_last_mod_ignore_set = 0; ps->no_last_mod_ignore = 0; ps->ignorecachecontrol = 0; @@ -736,9 +733,6 @@ static void * merge_cache_config(apr_pool_t *p, void *basev, void *overridesv) /* factor used to estimate Expires date from LastModified date */ ps->factor = (overrides->factor_set == 0) ? base->factor : overrides->factor; - /* default percentage to force cache completion */ - ps->complete = - (overrides->complete_set == 0) ? base->complete : overrides->complete; ps->no_last_mod_ignore = (overrides->no_last_mod_ignore_set == 0) @@ -884,23 +878,6 @@ static const char *set_cache_factor(cmd_parms *parms, void *dummy, return NULL; } -static const char *set_cache_complete(cmd_parms *parms, void *dummy, - const char *arg) -{ - cache_server_conf *conf; - int val; - - conf = - (cache_server_conf *)ap_get_module_config(parms->server->module_config, - &cache_module); - if (sscanf(arg, "%u", &val) != 1) { - return "CacheForceCompletion value must be a percentage"; - } - conf->complete = val; - conf->complete_set = 1; - return NULL; -} - static int cache_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s) { @@ -947,9 +924,6 @@ static const command_rec cache_cmds[] = AP_INIT_TAKE1("CacheLastModifiedFactor", set_cache_factor, NULL, RSRC_CONF, "The factor used to estimate Expires date from " "LastModified date"), - AP_INIT_TAKE1("CacheForceCompletion", set_cache_complete, NULL, RSRC_CONF, - "Percentage of download to arrive for the cache to force " - "complete transfer"), {NULL} }; diff --git a/modules/cache/mod_cache.h b/modules/cache/mod_cache.h index 5a4497bb27..c0336deb55 100644 --- a/modules/cache/mod_cache.h +++ b/modules/cache/mod_cache.h @@ -73,8 +73,6 @@ #define MIN(a,b) ((a) < (b) ? (a) : (b)) #endif -/* default completion is 60% */ -#define DEFAULT_CACHE_COMPLETION (60) #define MSEC_ONE_DAY ((apr_time_t)(86400*APR_USEC_PER_SEC)) /* one day, in microseconds */ #define MSEC_ONE_HR ((apr_time_t)(3600*APR_USEC_PER_SEC)) /* one hour, in microseconds */ #define MSEC_ONE_MIN ((apr_time_t)(60*APR_USEC_PER_SEC)) /* one minute, in microseconds */ @@ -125,8 +123,6 @@ typedef struct { int defex_set; double factor; /* factor for estimating expires date */ int factor_set; - int complete; /* Force cache completion after this point */ - int complete_set; /** ignore the last-modified header when deciding to cache this request */ int no_last_mod_ignore_set; int no_last_mod_ignore; diff --git a/modules/cache/mod_disk_cache.c b/modules/cache/mod_disk_cache.c index 9402157f1e..f05ee72864 100644 --- a/modules/cache/mod_disk_cache.c +++ b/modules/cache/mod_disk_cache.c @@ -264,9 +264,7 @@ static int create_entity(cache_handle_t *h, request_rec *r, /* If the Content-Length is still unknown, cache anyway */ if (len != -1 && (len < conf->minfs || len > conf->maxfs)) { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, - "cache_disk: URL %s failed the size check, " - "or is incomplete", - key); + "cache_disk: URL %s failed the size check", key); return DECLINED; } @@ -277,7 +275,6 @@ static int create_entity(cache_handle_t *h, request_rec *r, obj->key = apr_pstrdup(r->pool, key); /* XXX Bad Temporary Cast - see cache_object_t notes */ obj->info.len = (apr_size_t) len; - obj->complete = 0; /* Cache object is not complete */ dobj->name = obj->key; dobj->datafile = data_file(r->pool, conf, dobj, key); -- 2.40.0