Bug 207967

Summary: Resources larger than 10MB are not stored in the disk cache
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, commit-queue, darin, ggaren, koivisto, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 207959    
Bug Blocks:    
Attachments:
Description Flags
Patch none

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?