Activating the browser cache in the Java CEF implementation

Having problems with building or using the JCEF Java binding? Ask your questions here.

Activating the browser cache in the Java CEF implementation

Postby sebf » Fri Oct 17, 2014 6:35 am

Hello,

I use the Java wrapper of CEF (jcef_binary_3.1750.1738.91_windows64).
In this context I am wondering how to activate the browser cache.
  • I know that for the native version, the CEF client sample supports a "--cache-path" switch allowing to activate and define the directory to be used for web resources caching purpose, but i am struggling to figure out the corresponding API for the Java wrapper.
  • I tried to use something like CefApp.getInstance(new String[]{"--cache-path=c:\\temp\\jcefcache"}); (and also with a single dash). But it seemingly does not work.
Any idea?

Thanks in advance for your help.
Cheers
--
seb
sebf
Newbie
 
Posts: 5
Joined: Wed Mar 27, 2013 1:32 pm

Re: Activating the browser cache in the Java CEF implementat

Postby nicolae » Fri Oct 17, 2014 8:55 am

Hi Seb,

Please have a look at MainFrame.java under bin/tests/detailed in your downloaded JCEF directory.

Nicolae
nicolae
Techie
 
Posts: 10
Joined: Wed Oct 08, 2014 11:20 am

Re: Activating the browser cache in the Java CEF implementat

Postby sebf » Fri Oct 17, 2014 9:35 am

Hi Nicolae,

Thanks for your prompt answer.

Please apologize me if i am wrong but the only thing that somehow relates to persistent data in the file you mentioned is what the sample calls the cookie-path used by the CefCookieManager.
By cache, i was more referring to a file-based persistent storage that would allow the web resources to be persisted across different sessions of an application based on JCEF.

Am I missing something here?

Cheers
--
seb
sebf
Newbie
 
Posts: 5
Joined: Wed Mar 27, 2013 1:32 pm

Re: Activating the browser cache in the Java CEF implementat

Postby nicolae » Fri Oct 17, 2014 10:25 am

Hi Seb,

Sorry, seems like I did not understand fully to start with.

I see exactly what you mean now, and I also don't know how to achieve it, but would like to do so. I was looking around for an answer but can't find it?

Nicolae
nicolae
Techie
 
Posts: 10
Joined: Wed Oct 08, 2014 11:20 am

Re: Activating the browser cache in the Java CEF implementat

Postby magreenblatt » Fri Oct 17, 2014 10:49 am

You can set CefSettings.cache_path in the JCEF native code here and I've filed https://code.google.com/p/javachromiume ... ail?id=127.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Activating the browser cache in the Java CEF implementat

Postby nicolae » Fri Oct 17, 2014 11:28 am

Thanks!
nicolae
Techie
 
Posts: 10
Joined: Wed Oct 08, 2014 11:20 am

Re: Activating the browser cache in the Java CEF implementat

Postby sebf » Sun Oct 19, 2014 8:20 am

Thanks a lot Marshall. Having digged a little bit in the source code of both the Java version and the native version, this was indeed my comprehension of the issue.
BR
--
seb
sebf
Newbie
 
Posts: 5
Joined: Wed Mar 27, 2013 1:32 pm


Return to JCEF Forum

Who is online

Users browsing this forum: No registered users and 20 guests