1
0
Fork 0

Support for document.cache.interval (set it to -1) and rename it

...to document.cache.revalidation_interval. Moreover, -1 is the default
now.
This commit is contained in:
Petr Baudis 2006-11-03 19:56:55 +01:00 committed by Petr Baudis
parent 5af21a8d29
commit c7863324e0
2 changed files with 8 additions and 6 deletions

5
src/cache/cache.c vendored
View File

@ -196,8 +196,9 @@ get_validated_cache_entry(struct uri *uri, enum cache_mode cache_mode)
if (cached->cache_mode <= CACHE_MODE_CHECK_IF_MODIFIED
&& cache_mode <= CACHE_MODE_CHECK_IF_MODIFIED
&& (cached->last_modified || cached->etag)) {
if (cached->seconds + get_opt_int("document.cache.interval") < time(NULL))
&& (cached->last_modified || cached->etag)
&& get_opt_int("document.cache.revalidation_interval") >= 0) {
if (cached->seconds + get_opt_int("document.cache.revalidation_interval") < time(NULL))
return NULL;
}

View File

@ -502,10 +502,11 @@ static struct option_info config_options_info[] = {
"is always cached, even if it is over the memory cache size\n"
"threshold. (Then of course no other documents can be cached.)")),
/* FIXME: Write more. */
INIT_OPT_INT("document.cache", N_("Interval"),
"interval", 0, 0, 86400, 600,
N_("Interval between requests for the same document in seconds.")),
/* FIXME: Write more. */
INIT_OPT_INT("document.cache", N_("revalidation_Interval"),
"revalidation_interval", -1, 0, 86400, -1,
N_("Interval (in seconds) between a server is poked about changes in an\n"
"already cached document.")),
INIT_OPT_TREE("document.cache", N_("Memory cache"),
"memory", 0,