Bug 207967 - Resources larger than 10MB are not stored in the disk cache
Summary: Resources larger than 10MB are not stored in the disk cache
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on: 207959
Blocks:
  Show dependency treegraph
 
Reported: 2020-02-19 15:01 PST by Chris Dumez
Modified: 2020-02-20 12:27 PST (History)
6 users (show)

See Also:


Attachments
Patch (3.31 KB, patch)
2020-02-19 15:06 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2020-02-19 15:01:07 PST
Resources larger than 10MB are not stored in the disk cache.
Comment 1 Chris Dumez 2020-02-19 15:01:21 PST
<rdar://problem/59572084>
Comment 2 Chris Dumez 2020-02-19 15:06:34 PST
Created attachment 391206 [details]
Patch
Comment 3 WebKit Commit Bot 2020-02-19 22:07:46 PST
The commit-queue encountered the following flaky tests while processing attachment 391206 [details]:

editing/spelling/spellcheck-async-remove-frame.html bug 158401 (authors: morrita@google.com, rniwa@webkit.org, and tony@chromium.org)
The commit-queue is continuing to process your patch.
Comment 4 WebKit Commit Bot 2020-02-19 22:08:16 PST
Comment on attachment 391206 [details]
Patch

Clearing flags on attachment: 391206

Committed r257041: <https://trac.webkit.org/changeset/257041>
Comment 5 WebKit Commit Bot 2020-02-19 22:08:18 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Antti Koivisto 2020-02-20 12:27:36 PST
Comment on attachment 391206 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=391206&action=review

> Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:588
> -        // Prevent memory growth in case of streaming data.
> -        const size_t maximumCacheBufferSize = 10 * 1024 * 1024;
> +        // Prevent memory growth in case of streaming data and limit size of entries in the cache.
> +        const size_t maximumCacheBufferSize = m_cache->capacity() / 8;

If the capacity computes to less than the 80MB this will reduce the maximum size. Can that be a problem?

> Source/WebKit/Shared/CacheModel.cpp:188
> -            urlCacheDiskCapacity = 500 * MB;
> +            urlCacheDiskCapacity = 1 * GB;

Maybe also increment DocumentBrowser cache model similarly?