1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-28 03:06:20 -04:00

go_back, get_validated_cache entry: Do not load a document from the network

when there is one in the cache.

Previously, when document.cache.revalidation_interval was >= 0,
the given interval elapsed and the network was down
an error occured and one could not go back. This was very annoying.
This commit is contained in:
Witold Filipczyk 2007-09-27 19:58:03 +02:00 committed by Witold Filipczyk
parent c3501b2e62
commit 42bf898e7a

2
src/cache/cache.c vendored
View File

@ -195,7 +195,7 @@ 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
&& cache_mode != CACHE_MODE_ALWAYS
&& (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))