App Cache with In-Memory cache backend

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

App Cache with In-Memory cache backend

Postby igor » Thu Jul 21, 2016 6:16 am

Hello.

I have a web app that utilizes App Cache and is able to work offline.
Sometimes I have to launch the app in CEF with In-Memory cache on (to do this I don't pass 'cache_path' command line argument to CEF).
After that I start to receive an error: 'Application Cache Error event: Failed to commit new cache to storage, would exceed quota'.
I used the following page: http://www.der-schepp.de/appcache-default-size/
to determine how much space is available for App Cache.
When disk cache is used the granted space is more than 256mb, but when 'In-Memory' implementation is used the test page cannot allocate even 1mb.

I did the same test in Chrome (as far as I know it uses In-Memory cache in Incognito mode) and it doesn't have this limitation.

Does anybody know how to increase App Cache size when In-Memory cache is used?
igor
Newbie
 
Posts: 4
Joined: Thu Jul 21, 2016 5:50 am

Re: App Cache with In-Memory cache backend

Postby magreenblatt » Thu Jul 21, 2016 8:08 am

What OS and CEF version?
magreenblatt
Site Admin
 
Posts: 12406
Joined: Fri May 29, 2009 6:57 pm

Re: App Cache with In-Memory cache backend

Postby igor » Thu Jul 21, 2016 12:27 pm

OS is Windows 7 x64, also tried on Windows 10.
CEF version is 3.2623.1401, also tried 3.2623.1397
igor
Newbie
 
Posts: 4
Joined: Thu Jul 21, 2016 5:50 am

Re: App Cache with In-Memory cache backend

Postby magreenblatt » Thu Jul 21, 2016 12:45 pm

The maximum in-memory disk cache size should be 10MB. Since you're not getting to that there's likely some other issue. Code is here if you want to debug: https://cs.chromium.org/chromium/src/co ... l=0&l=1910. Feel free to also create an issue.
magreenblatt
Site Admin
 
Posts: 12406
Joined: Fri May 29, 2009 6:57 pm

Re: App Cache with In-Memory cache backend

Postby igor » Thu Jul 21, 2016 2:53 pm

As I understand in-memory cache size starts with 10mb and grows up to 50mb depending on available memory - here is the code:
https://cs.chromium.org/chromium/src/net/disk_cache/memory/mem_backend_impl.cc
Do I understand correctly that the size of this cache backend is shared between different caches like App Cache, WebSQL, etc.?

I also noticed 'is_incognito_' variable in the code https://cs.chromium.org/chromium/src/content/browser/appcache/appcache_storage_impl.cc?rcl=0&l=1910
But I don't remember such option in CEF. Is this variable set by CEF behind the scenes?
igor
Newbie
 
Posts: 4
Joined: Thu Jul 21, 2016 5:50 am

Re: App Cache with In-Memory cache backend

Postby magreenblatt » Thu Jul 21, 2016 3:10 pm

AppCache is not the same as disk cache. AppCache is just the HTML5 AppCache feature.

'is_incognito_' is set here: https://cs.chromium.org/chromium/src/co ... l=0&l=1446. The cache directory path should be empty when CEF is running without a CefSettings.cache_path value.
magreenblatt
Site Admin
 
Posts: 12406
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: civilogic, Google [Bot] and 37 guests