mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-23 12:36:51 +03:00
Ensure cache hits after a forced reload -- don't even attempt to reuse objects with the no_cache flag set (as they'll never be considered fresh, thus requiring a round trip to the server every time they're used). Instead, we'll fetch a new object, which will be considered fresh for caching purposes.
svn path=/trunk/netsurf/; revision=11789
This commit is contained in:
parent
9125bd1fa4
commit
4f740f5a32
@ -777,9 +777,12 @@ nserror llcache_object_retrieve_from_cache(const char *url, uint32_t flags,
|
||||
for (obj = llcache_cached_objects; obj != NULL; obj = obj->next) {
|
||||
bool match;
|
||||
|
||||
if (url_compare(obj->url, url, true, &match) == URL_FUNC_OK &&
|
||||
match == true && (newest == NULL ||
|
||||
obj->cache.req_time > newest->cache.req_time)) {
|
||||
if ((newest == NULL ||
|
||||
obj->cache.req_time > newest->cache.req_time) &&
|
||||
obj->cache.no_cache == false &&
|
||||
url_compare(obj->url, url, true,
|
||||
&match) == URL_FUNC_OK &&
|
||||
match == true) {
|
||||
newest = obj;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user