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.
Created attachment 210075 [details] patch When the argument of clearResourceCaches is only AllResourceCaches, SetCacheModel can be called.
This doesn't look right to me - we still need to call setCacheModel to clear memory cache here.
(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.
This is not necessarily accurate - for example, Mac implementation doesn't shrink disk cache.
Comment on attachment 210075 [details] patch Assuming that patches for review since 2013 are stale, r-