mirror of
https://github.com/rkd77/elinks.git
synced 2025-01-03 14:57:44 -05: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:
parent
c3501b2e62
commit
42bf898e7a
2
src/cache/cache.c
vendored
2
src/cache/cache.c
vendored
@ -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
|
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)
|
&& (cached->last_modified || cached->etag)
|
||||||
&& get_opt_int("document.cache.revalidation_interval") >= 0) {
|
&& get_opt_int("document.cache.revalidation_interval") >= 0) {
|
||||||
if (cached->seconds + get_opt_int("document.cache.revalidation_interval") < time(NULL))
|
if (cached->seconds + get_opt_int("document.cache.revalidation_interval") < time(NULL))
|
||||||
|
Loading…
Reference in New Issue
Block a user