]> granicus.if.org Git - apache/commitdiff
mod_cache: Remove unimplemented CacheForceCompletion directive.
authorJustin Erenkrantz <jerenkrantz@apache.org>
Wed, 19 Jan 2005 00:19:58 +0000 (00:19 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Wed, 19 Jan 2005 00:19:58 +0000 (00:19 +0000)
* 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
docs/manual/mod/mod_cache.xml
docs/manual/mod/mod_cache.xml.ja
docs/manual/mod/mod_cache.xml.ko
modules/cache/mod_cache.c
modules/cache/mod_cache.h
modules/cache/mod_disk_cache.c

diff --git a/CHANGES b/CHANGES
index aba471b2c673ca311547e18475ceb103a9e1a8af..4ed67c866079c4b34ee060bc5f1c6aa173a9ba26 100644 (file)
--- 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 <jfs computer.org>]
 
index 8fabace26d8c9410d872ea558a5edb02eaf07f44..46fcbc0d5a5f725b3346294a9fe4299b9228f58e 100644 (file)
@@ -290,39 +290,6 @@ LastModified date.</description>
 </usage>
 </directivesynopsis>
 
-<directivesynopsis>
-<name>CacheForceCompletion</name>
-<description>Percentage of document served, after which the server
-will complete caching the file even if the request is cancelled.</description>
-<syntax>CacheForceCompletion <var>Percentage</var></syntax>
-<default>CacheForceCompletion 60</default>
-<contextlist><context>server config</context><context>virtual host</context>
-</contextlist>
-
-<usage>
-    <p>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
-    <directive>CacheForceCompletion</directive> directive specifies a
-    threshold beyond which the document will continue to be cached to
-    completion, even if the request is cancelled.</p>
-
-    <p>The threshold is a percentage specified as a value between
-    <code>1</code> and <code>100</code>. A value of <code>0</code>
-    specifies that the default be used. A value of <code>100</code>
-    will only cache documents that are served in their entirety. A value
-    between 60 and 90 is recommended.</p>
-
-    <example>
-      CacheForceCompletion 80
-    </example>
-
-    <note type="warning"><title>Note:</title>
-      This feature is currently <em>not</em> implemented.
-    </note>
-</usage>
-</directivesynopsis>
-
 <directivesynopsis>
 <name>CacheIgnoreHeaders</name>
 <description>Do not store the given HTTP header(s) in the cache.
index db4e24417229912673309de0aa853e9a70c0f31e..e1b0437d2e8ca37ddb035d8c0d9fd30001c9bb1d 100644 (file)
 </usage>
 </directivesynopsis>
 
-<directivesynopsis>
-<name>CacheForceCompletion</name>
-<description>\e$B%j%/%(%9%H$,%-%c%s%;%k$5$l$F$b%-%c%C%7%e$r40N;$9$k$+$I$&$+$r\e(B
-\e$B7h$a$kAw$i$l$?%I%-%e%a%s%H$N3d9g$r;XDj$9$k!#\e(B</description>
-<syntax>CacheForceCompletion <var>Percentage</var></syntax>
-<default>CacheForceCompletion 60</default>
-<contextlist><context>server config</context><context>virtual host</context>
-</contextlist>
-
-<usage>
-    <p>\e$BDL>o!"1~Ez$,%-%c%C%7%e$5$l$F%/%i%$%"%s%H$KAw$i$l$F$$$k:GCf$K\e(B
-    \e$B%j%/%(%9%H$,%-%c%s%;%k$5$l$k$H!"1~Ez$N=hM}$OCf;_$5$l$F!"%-%c%C%7%e$N\e(B
-    \e$B%(%s%H%j$b:o=|$5$l$^$9!#\e(B<directive>CacheForceCompletion</directive>
-    \e$B%G%#%l%/%F%#%V$O!"%j%/%(%9%H$,%-%c%s%;%k$5$l$F$b!"%-%c%C%7%e=hM}$r\e(B
-    \e$B40N;$^$GB3$1$k$+$I$&$+$N$7$-$$CM$r;XDj$7$^$9!#\e(B</p>
-
-    <p>\e$B$7$-$$CM$O\e(B <code>1</code> \e$B$H\e(B <code>100</code> \e$B$N4V$G;XDj$9$k\e(B
-    \e$B3d9g$G$9!#\e(B<code>0</code> \e$B$G$O%G%U%)%k%H$,;H$o$l$^$9!#\e(B
-    <code>100</code> \e$B$G$O!"40A4$KAw?.$,40N;$7$?%I%-%e%a%s%H$N$_$r\e(B
-    \e$B%-%c%C%7%e$7$^$9!#\e(B60 \e$B$+$i\e(B 90 \e$B$N4V$NCM$,?d>)CM$G$9!#\e(B</p>
-
-    <example>
-      CacheForceCompletion 80
-    </example>
-
-    <note type="warning"><title>\e$BCm\e(B:</title>
-      \e$B$3$N5!G=$O8=;~E@$G$O<BAu$5$l$F\e(B<em>\e$B$$$^$;$s\e(B</em>\e$B!#\e(B
-    </note>
-</usage>
-</directivesynopsis>
-
 <directivesynopsis>
 <name>CacheIgnoreHeaders</name>
 <description>\e$B;XDj$5$l$?\e(B HTTP \e$B%X%C%@$r%-%c%C%7%e$KJ]B8$7$J$$!#\e(B
index 6d90b80554a89ae4ccf33790af2e4804e47756a1..7ff18d673872a052504cc7c0cbffec355ae3a411 100644 (file)
 </usage>
 </directivesynopsis>
 
-<directivesynopsis>
-<name>CacheForceCompletion</name>
-<description>¿äûÀÌ Ãë¼ÒµÇ´õ¶óµµ ¼­¹ö°¡ ÆÄÀÏÀ» °è¼Ó Ä³½¬ÇϱâÀ§ÇØ
-ÇÊ¿äÇÑ ¹®¼­ÀÇ ¼­ºñ½º·ü.</description>
-<syntax>CacheForceCompletion <var>Percentage</var></syntax>
-<default>CacheForceCompletion 60</default>
-<contextlist><context>server config</context><context>virtual host</context>
-</contextlist>
-
-<usage>
-    <p>º¸Åë ÀÀ´äÀ» Ä³½¬Çϰí Å¬¶óÀÌ¾ðÆ®·Î º¸³»´Â µµÁß¿¡ ¿äûÀÌ
-    Ãë¼ÒµÇ¸é ÀÀ´ä Ã³¸®¸¦ Áߴܵǰí Ä³½¬ Ç׸ñÀ» Áö¿î´Ù.
-    <directive>CacheForceCompletion</directive> Áö½Ã¾î´Â ¿äûÀÌ
-    Ãë¼ÒµÇ´õ¶óµµ ¹®¼­¸¦ °è¼Ó Ä³½¬ÇÒ Á¤µµ¸¦ ÁöÁ¤ÇÑ´Ù.</p>
-
-    <p>Á¤µµ´Â ¹éºÐÀ²·Î ³ªÅ¸³»¸ç <code>1</code>°ú <code>100</code>
-    »çÀÌÀÇ °ªÀÌ´Ù. <code>0</code> °ªÀ» ÁöÁ¤Çϸ頱⺻°ªÀ» »ç¿ëÇÑ´Ù.
-    <code>100</code>Àº ³»¿ëÀ» ¸ðµÎ ¼­ºñ½ºÇÑ ¹®¼­¸¸À» Ä³½¬ÇÑ´Ù.
-    60°ú 90 »çÀÌÀÇ °ªÀ» ÃßõÇÑ´Ù.</p>
-
-    <example>
-      CacheForceCompletion 80
-    </example>
-
-    <note type="warning"><title>ÁÖÀÇ:</title>
-      ÀÌ ±â´ÉÀº ÇöÀç ±¸ÇöµÇÁö <em>¾Ê¾Ò´Ù</em>.
-    </note>
-</usage>
-</directivesynopsis>
-
 <directivesynopsis>
 <name>CacheIgnoreHeaders</name>
 <description>ij½¬¿¡ ÁöÁ¤ÇÑ HTTP Çì´õ(µé)¸¦ ÀúÀåÇÏÁö ¾Ê´Â´Ù
index 0a2f67cb5bcdc1dcfe17720b2be0c81e47e93ed9..335ab81585555521b766f22daa370b91972f7721 100644 (file)
@@ -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}
 };
 
index 5a4497bb27298675a1f531ee548480adef0f81bd..c0336deb55bc14c111f4c3d056e94be5c0036cef 100644 (file)
@@ -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; 
index 9402157f1e0abf92de8dd5713856b863781f3d7a..f05ee7286487c7f66e4108e29780f54a38dc5343 100644 (file)
@@ -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);