Title: [232190] trunk/Source/WebKit
Revision
232190
Author
[email protected]
Date
2018-05-25 10:23:13 -0700 (Fri, 25 May 2018)

Log Message

Avoid triggering network cache speculative revalidation for loads allowing expired content
https://bugs.webkit.org/show_bug.cgi?id=185985

Reviewed by Antti Koivisto.

Avoid triggering network cache speculative revalidation for loads allowing expired content
(e.g. history loads, restoring pages after crash or safari relaunch). This causes us to do
unnecessary revalidations, it is both wasteful and bad for performance.

* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::retrieve):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (232189 => 232190)


--- trunk/Source/WebKit/ChangeLog	2018-05-25 16:25:27 UTC (rev 232189)
+++ trunk/Source/WebKit/ChangeLog	2018-05-25 17:23:13 UTC (rev 232190)
@@ -1,3 +1,17 @@
+2018-05-25  Chris Dumez  <[email protected]>
+
+        Avoid triggering network cache speculative revalidation for loads allowing expired content
+        https://bugs.webkit.org/show_bug.cgi?id=185985
+
+        Reviewed by Antti Koivisto.
+
+        Avoid triggering network cache speculative revalidation for loads allowing expired content
+        (e.g. history loads, restoring pages after crash or safari relaunch). This causes us to do
+        unnecessary revalidations, it is both wasteful and bad for performance.
+
+        * NetworkProcess/cache/NetworkCache.cpp:
+        (WebKit::NetworkCache::Cache::retrieve):
+
 2018-05-25  David Kilzer  <[email protected]>
 
         Fix issues with -dealloc methods found by clang static analyzer

Modified: trunk/Source/WebKit/NetworkProcess/cache/NetworkCache.cpp (232189 => 232190)


--- trunk/Source/WebKit/NetworkProcess/cache/NetworkCache.cpp	2018-05-25 16:25:27 UTC (rev 232189)
+++ trunk/Source/WebKit/NetworkProcess/cache/NetworkCache.cpp	2018-05-25 17:23:13 UTC (rev 232190)
@@ -321,7 +321,7 @@
     Key storageKey = makeCacheKey(request);
 
 #if ENABLE(NETWORK_CACHE_SPECULATIVE_REVALIDATION)
-    bool canUseSpeculativeRevalidation = m_speculativeLoadManager && !request.isConditional();
+    bool canUseSpeculativeRevalidation = m_speculativeLoadManager && !request.isConditional() && !cachePolicyAllowsExpired(request.cachePolicy());
     if (canUseSpeculativeRevalidation)
         m_speculativeLoadManager->registerLoad(frameID, request, storageKey);
 #endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to