Bug 136432

Summary: [WinCairo] Memory cache capacity is not set.
Product: WebKit Reporter: peavo
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: alex.christensen, bfulgham, commit-queue
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description peavo 2014-09-01 11:06:38 PDT
This leaves us with the default capacity, which is quite low, causing images to be removed from the cache earlier than necessary.
AppleWin already has code for this, which we can reuse.
Comment 1 peavo 2014-09-01 11:10:35 PDT
Created attachment 237456 [details]
Patch
Comment 2 Alex Christensen 2014-09-01 14:23:57 PDT
Should there be curl equivalents of CFURLSetMemoryCapacity and CFURLSetDiskCapacity?
Comment 3 peavo 2014-09-02 10:07:22 PDT
Created attachment 237501 [details]
Patch
Comment 4 peavo 2014-09-02 10:09:35 PDT
(In reply to comment #2)
> Should there be curl equivalents of CFURLSetMemoryCapacity and CFURLSetDiskCapacity?

Thanks for reviewing, updated patch with curl equivalent of CFURLSetDiskCapacity.
I don't think there is something similar for CFURLSetMemoryCapacity.
Comment 5 Alex Christensen 2014-09-02 10:44:41 PDT
This looks good to me.  I'm not sure if WinCairo even has something like the CFURL cache, though.  Brent, do you know?
Comment 6 Alex Christensen 2014-09-02 22:28:26 PDT
Comment on attachment 237501 [details]
Patch

CFURLCacheSetMemoryCapacity  and CFURLCacheSetDiskCapacity  seem to be undocumented :(

CurlCacheManager::setStorageSizeLimit just changes m_storageSizeLimit, which defaults to 50MB but this could increase it to 175MB if there is an incredible amount of space on the disk.  This seems ok to me.
Comment 7 WebKit Commit Bot 2014-09-02 23:05:00 PDT
Comment on attachment 237501 [details]
Patch

Clearing flags on attachment: 237501

Committed r173200: <http://trac.webkit.org/changeset/173200>
Comment 8 WebKit Commit Bot 2014-09-02 23:05:03 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 peavo 2014-09-02 23:36:07 PDT
(In reply to comment #6)
> (From update of attachment 237501 [details])
> CFURLCacheSetMemoryCapacity  and CFURLCacheSetDiskCapacity  seem to be undocumented :(
> 
> CurlCacheManager::setStorageSizeLimit just changes m_storageSizeLimit, which defaults to 50MB but this could increase it to 175MB if there is an incredible amount of space on the disk.  This seems ok to me.

Thanks!
Comment 10 Brent Fulgham 2014-09-03 09:13:37 PDT
Note: This broke the Apple Windows build because it expected cacheMemoryCapacity (and cacheDiskCapacity) to be CFIndex type. Fixed in <http://trac.webkit.org/changeset/173207>.
Comment 11 peavo 2014-09-03 10:11:05 PDT
(In reply to comment #10)
> Note: This broke the Apple Windows build because it expected cacheMemoryCapacity (and cacheDiskCapacity) to be CFIndex type. Fixed in <http://trac.webkit.org/changeset/173207>.

Thanks for fixing it, and sorry for the inconvenience ...