Title: [188755] trunk
- Revision
- 188755
- Author
- [email protected]
- Date
- 2015-08-21 09:18:52 -0700 (Fri, 21 Aug 2015)
Log Message
Regression(r188698): http/tests/cache/disk-cache/disk-cache-revalidation-new-expire-header.html is very flaky
https://bugs.webkit.org/show_bug.cgi?id=148205
Reviewed by Antti Koivisto.
Source/WebKit2:
After r188640, successful revalidation of resources in the memory cache
would cause us to drop the corresponding resource in the disk cache.
This patch addresses the issue by not removing the cache entry if the
response is a successful revalidation (i.e. status code == 304).
Longer term, we should probably update the entry in the disk cache (if
it exists) when it is revalidated by the memory cache. Currently,
revalidation by the memory cache bypasses the disk cache and goes
straight to the network. Then, when the response comes back as a 304,
we try and store the response in the cache. However, a 304 status code
is not cacheable so the cache rejects it.
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::store):
LayoutTests:
* http/tests/cache/disk-cache/disk-cache-revalidation-new-expire-header.html:
Drop temporary fix landed in r188698 to make the test less flaky.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (188754 => 188755)
--- trunk/LayoutTests/ChangeLog 2015-08-21 16:05:20 UTC (rev 188754)
+++ trunk/LayoutTests/ChangeLog 2015-08-21 16:18:52 UTC (rev 188755)
@@ -1,3 +1,13 @@
+2015-08-21 Chris Dumez <[email protected]>
+
+ Regression(r188698): http/tests/cache/disk-cache/disk-cache-revalidation-new-expire-header.html is very flaky
+ https://bugs.webkit.org/show_bug.cgi?id=148205
+
+ Reviewed by Antti Koivisto.
+
+ * http/tests/cache/disk-cache/disk-cache-revalidation-new-expire-header.html:
+ Drop temporary fix landed in r188698 to make the test less flaky.
+
2015-08-20 Nan Wang <[email protected]>
AX: fix accessibility/loading-iframe-updates-axtree.html test for mac
Modified: trunk/LayoutTests/http/tests/cache/disk-cache/disk-cache-revalidation-new-expire-header.html (188754 => 188755)
--- trunk/LayoutTests/http/tests/cache/disk-cache/disk-cache-revalidation-new-expire-header.html 2015-08-21 16:05:20 UTC (rev 188754)
+++ trunk/LayoutTests/http/tests/cache/disk-cache/disk-cache-revalidation-new-expire-header.html 2015-08-21 16:18:52 UTC (rev 188755)
@@ -13,11 +13,8 @@
debug("");
runTests(tests, function() {
- // Wait for things to settle down in the cache.
- setTimeout(function() {
- debug("304 response included an 'Expires' header in the future, so we should not need to revalidate this time.");
- runTests(tests);
- }, 200);
+ debug("304 response included an 'Expires' header in the future, so we should not need to revalidate this time.");
+ runTests(tests);
});
</script>
Modified: trunk/Source/WebKit2/ChangeLog (188754 => 188755)
--- trunk/Source/WebKit2/ChangeLog 2015-08-21 16:05:20 UTC (rev 188754)
+++ trunk/Source/WebKit2/ChangeLog 2015-08-21 16:18:52 UTC (rev 188755)
@@ -1,3 +1,25 @@
+2015-08-21 Chris Dumez <[email protected]>
+
+ Regression(r188698): http/tests/cache/disk-cache/disk-cache-revalidation-new-expire-header.html is very flaky
+ https://bugs.webkit.org/show_bug.cgi?id=148205
+
+ Reviewed by Antti Koivisto.
+
+ After r188640, successful revalidation of resources in the memory cache
+ would cause us to drop the corresponding resource in the disk cache.
+ This patch addresses the issue by not removing the cache entry if the
+ response is a successful revalidation (i.e. status code == 304).
+
+ Longer term, we should probably update the entry in the disk cache (if
+ it exists) when it is revalidated by the memory cache. Currently,
+ revalidation by the memory cache bypasses the disk cache and goes
+ straight to the network. Then, when the response comes back as a 304,
+ we try and store the response in the cache. However, a 304 status code
+ is not cacheable so the cache rejects it.
+
+ * NetworkProcess/cache/NetworkCache.cpp:
+ (WebKit::NetworkCache::Cache::store):
+
2015-08-20 Joonghun Park <[email protected]>
[EFL] Revise PlatformWebView ctor according to r188718
Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp (188754 => 188755)
--- trunk/Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp 2015-08-21 16:05:20 UTC (rev 188754)
+++ trunk/Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp 2015-08-21 16:18:52 UTC (rev 188755)
@@ -407,8 +407,11 @@
LOG(NetworkCache, "(NetworkProcess) didn't store, storeDecision=%d", storeDecision);
auto key = makeCacheKey(originalRequest);
- // Make sure we don't keep a stale entry in the cache.
- remove(key);
+ auto isSuccessfulRevalidation = response.httpStatusCode() == 304;
+ if (!isSuccessfulRevalidation) {
+ // Make sure we don't keep a stale entry in the cache.
+ remove(key);
+ }
if (m_statistics)
m_statistics->recordNotCachingResponse(key, storeDecision);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes