Bug 120514

Summary: [WebKit2]SetCacheModel must be callled when ResourceCachesToClear is AllResourceCaches
Product: WebKit Reporter: Sangho Kim <thomas.kim>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: UNCONFIRMED ---    
Severity: Normal CC: ap, beidson, skyul, xingri, yoon
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch beidson: review-

Description Sangho Kim 2013-08-30 01:08:29 PDT
WebProcess has clearResourceCaches function.
It deletes Disk cache by using setCacheModel(DocumentViewer)
But I think if ResourceCachesToClear is onlyInMemory, Disk cache should not be deleted.
Comment 1 Sangho Kim 2013-08-30 01:18:38 PDT
Created attachment 210075 [details]
patch

When the argument of clearResourceCaches is only AllResourceCaches, SetCacheModel can be called.
Comment 2 Alexey Proskuryakov 2013-09-03 12:14:32 PDT
This doesn't look right to me - we still need to call setCacheModel to clear memory cache here.
Comment 3 Sangho Kim 2013-09-03 16:55:06 PDT
(In reply to comment #2)
> This doesn't look right to me - we still need to call setCacheModel to clear memory cache here.

If the setCacheModel(CacheModelDocumentViewer) is called, Disk Cache is deleted.
I think Disk Cache should not be deleted when user want to delete only caches in memory.
Comment 4 Alexey Proskuryakov 2013-09-04 09:45:19 PDT
This is not necessarily accurate - for example, Mac implementation doesn't shrink disk cache.
Comment 5 Brady Eidson 2016-05-24 22:02:37 PDT
Comment on attachment 210075 [details]
patch

Assuming that patches for review since 2013 are stale, r-