Changeset 182154 in webkit


Ignore:
Timestamp:
Mar 30, 2015, 3:00:17 PM (10 years ago)
Author:
Antti Koivisto
Message:

Don't cache resources that are very unlikely to be reused
https://bugs.webkit.org/show_bug.cgi?id=143226

Reviewed by Chris Dumez.

Source/WebKit2:

Follow-up to cover Cache-control: no-cache case which also has zero cache lifetime.

  • NetworkProcess/cache/NetworkCache.cpp:

(WebKit::NetworkCache::makeStoreDecision):

LayoutTests:

  • http/tests/cache/disk-cache/disk-cache-validation-back-navigation-policy-expected.txt:
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/LayoutTests/ChangeLog

    r182152 r182154  
     12015-03-30  Antti Koivisto  <antti@apple.com>
     2
     3        Don't cache resources that are very unlikely to be reused
     4        https://bugs.webkit.org/show_bug.cgi?id=143226
     5
     6        Reviewed by Chris Dumez.
     7
     8        * http/tests/cache/disk-cache/disk-cache-validation-back-navigation-policy-expected.txt:
     9
    1102015-03-30  Antti Koivisto  <antti@apple.com>
    211
  • TabularUnified trunk/LayoutTests/http/tests/cache/disk-cache/disk-cache-validation-back-navigation-policy-expected.txt

    r182152 r182154  
    3131
    3232response headers: {"Cache-control":"max-age=100, no-cache"}
    33 response source: Disk cache
     33response source: Network
    3434
    3535response headers: {"ETag":"match"}
     
    112112
    113113response headers: {"Cache-control":"max-age=100, no-cache, must-revalidate"}
    114 response source: Disk cache
     114response source: Network
    115115
    116116response headers: {"ETag":"match","Cache-control":"must-revalidate"}
  • TabularUnified trunk/Source/WebKit2/ChangeLog

    r182153 r182154  
     12015-03-30  Antti Koivisto  <antti@apple.com>
     2
     3        Don't cache resources that are very unlikely to be reused
     4        https://bugs.webkit.org/show_bug.cgi?id=143226
     5
     6        Reviewed by Chris Dumez.
     7
     8        Follow-up to cover Cache-control: no-cache case which also has zero cache lifetime.
     9
     10        * NetworkProcess/cache/NetworkCache.cpp:
     11        (WebKit::NetworkCache::makeStoreDecision):
     12
    1132015-03-30  Antti Koivisto  <antti@apple.com>
    214
  • TabularUnified trunk/Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp

    r182152 r182154  
    280280    if (!storeUnconditionallyForHistoryNavigation) {
    281281        auto currentTime = std::chrono::duration<double>(std::chrono::system_clock::now().time_since_epoch());
    282         bool hasNonZeroLifetime = WebCore::computeFreshnessLifetimeForHTTPFamily(response, currentTime.count()) > 0;
     282        bool hasNonZeroLifetime = !response.cacheControlContainsNoCache() && WebCore::computeFreshnessLifetimeForHTTPFamily(response, currentTime.count()) > 0;
    283283
    284284        bool possiblyReusable = response.hasCacheValidatorFields() || hasNonZeroLifetime;
Note: See TracChangeset for help on using the changeset viewer.