Changeset 188953 in webkit


Ignore:
Timestamp:
Aug 26, 2015 12:49:53 AM (9 years ago)
Author:
Carlos Garcia Campos
Message:

Merge r188755 - 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.

Location:
releases/WebKitGTK/webkit-2.10
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog

    r188952 r188953  
     12015-08-21  Chris Dumez  <cdumez@apple.com>
     2
     3        Regression(r188698): http/tests/cache/disk-cache/disk-cache-revalidation-new-expire-header.html is very flaky
     4        https://bugs.webkit.org/show_bug.cgi?id=148205
     5
     6        Reviewed by Antti Koivisto.
     7
     8        * http/tests/cache/disk-cache/disk-cache-revalidation-new-expire-header.html:
     9        Drop temporary fix landed in r188698 to make the test less flaky.
     10
     112015-08-20  Chris Dumez  <cdumez@apple.com>
     12
     13        REGRESSION: http/tests/cache/disk-cache/disk-cache-revalidation-new-expire-header.html is very flaky
     14        https://bugs.webkit.org/show_bug.cgi?id=148205
     15
     16        Unreviewed, give the disk cache a chance to settle down before querying
     17        the resource again. This fixes the flakiness locally. Longer term, I will
     18        try and figure out why the cache is sometimes revalidating if the resource
     19        is requested very quickly after.
     20
     21        * http/tests/cache/disk-cache/disk-cache-revalidation-new-expire-header.html:
     22
    1232015-08-19  Chris Dumez  <cdumez@apple.com>
    224
  • releases/WebKitGTK/webkit-2.10/Source/WebKit2/ChangeLog

    r188952 r188953  
     12015-08-21  Chris Dumez  <cdumez@apple.com>
     2
     3        Regression(r188698): http/tests/cache/disk-cache/disk-cache-revalidation-new-expire-header.html is very flaky
     4        https://bugs.webkit.org/show_bug.cgi?id=148205
     5
     6        Reviewed by Antti Koivisto.
     7
     8        After r188640, successful revalidation of resources in the memory cache
     9        would cause us to drop the corresponding resource in the disk cache.
     10        This patch addresses the issue by not removing the cache entry if the
     11        response is a successful revalidation (i.e. status code == 304).
     12
     13        Longer term, we should probably update the entry in the disk cache (if
     14        it exists) when it is revalidated by the memory cache. Currently,
     15        revalidation by the memory cache bypasses the disk cache and goes
     16        straight to the network. Then, when the response comes back as a 304,
     17        we try and store the response in the cache. However, a 304 status code
     18        is not cacheable so the cache rejects it.
     19
     20        * NetworkProcess/cache/NetworkCache.cpp:
     21        (WebKit::NetworkCache::Cache::store):
     22
    1232015-08-19  Chris Dumez  <cdumez@apple.com>
    224
  • releases/WebKitGTK/webkit-2.10/Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp

    r188952 r188953  
    408408        auto key = makeCacheKey(originalRequest);
    409409
    410         // Make sure we don't keep a stale entry in the cache.
    411         remove(key);
     410        auto isSuccessfulRevalidation = response.httpStatusCode() == 304;
     411        if (!isSuccessfulRevalidation) {
     412            // Make sure we don't keep a stale entry in the cache.
     413            remove(key);
     414        }
    412415
    413416        if (m_statistics)
Note: See TracChangeset for help on using the changeset viewer.