mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
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:
parent
5af21a8d29
commit
c7863324e0
5
src/cache/cache.c
vendored
5
src/cache/cache.c
vendored
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user