[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>]
</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.
</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
</usage>
</directivesynopsis>
-<directivesynopsis>
-<name>CacheForceCompletion</name>
-<description>¿äûÀÌ Ãë¼ÒµÇ´õ¶óµµ ¼¹ö°¡ ÆÄÀÏÀ» °è¼Ó ij½¬ÇϱâÀ§ÇØ
-ÇÊ¿äÇÑ ¹®¼ÀÇ ¼ºñ½º·ü.</description>
-<syntax>CacheForceCompletion <var>Percentage</var></syntax>
-<default>CacheForceCompletion 60</default>
-<contextlist><context>server config</context><context>virtual host</context>
-</contextlist>
-
-<usage>
- <p>º¸Åë ÀÀ´äÀ» ij½¬Çϰí Ŭ¶óÀÌ¾ðÆ®·Î º¸³»´Â µµÁß¿¡ ¿äûÀÌ
- Ãë¼ÒµÇ¸é ÀÀ´ä 󸮸¦ Áߴܵǰí ij½¬ Ç׸ñÀ» Áö¿î´Ù.
- <directive>CacheForceCompletion</directive> Áö½Ã¾î´Â ¿äûÀÌ
- Ãë¼ÒµÇ´õ¶óµµ ¹®¼¸¦ °è¼Ó ij½¬ÇÒ Á¤µµ¸¦ ÁöÁ¤ÇÑ´Ù.</p>
-
- <p>Á¤µµ´Â ¹éºÐÀ²·Î ³ªÅ¸³»¸ç <code>1</code>°ú <code>100</code>
- »çÀÌÀÇ °ªÀÌ´Ù. <code>0</code> °ªÀ» ÁöÁ¤ÇÏ¸é ±âº»°ªÀ» »ç¿ëÇÑ´Ù.
- <code>100</code>Àº ³»¿ëÀ» ¸ðµÎ ¼ºñ½ºÇÑ ¹®¼¸¸À» ij½¬ÇÑ´Ù.
- 60°ú 90 »çÀÌÀÇ °ªÀ» ÃßõÇÑ´Ù.</p>
-
- <example>
- CacheForceCompletion 80
- </example>
-
- <note type="warning"><title>ÁÖÀÇ:</title>
- ÀÌ ±â´ÉÀº ÇöÀç ±¸ÇöµÇÁö <em>¾Ê¾Ò´Ù</em>.
- </note>
-</usage>
-</directivesynopsis>
-
<directivesynopsis>
<name>CacheIgnoreHeaders</name>
<description>ij½¬¿¡ ÁöÁ¤ÇÑ HTTP Çì´õ(µé)¸¦ ÀúÀåÇÏÁö ¾Ê´Â´Ù
/* 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;
/* 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)
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)
{
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}
};
#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 */
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;
/* 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;
}
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);