Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

Different cache directories id dcef4

Post Reply
mihmih8
Posts: 2
Joined: Sat Mar 13, 2021 12:32 am

Different cache directories id dcef4

Post by mihmih8 »

Hello!

How can I use different cache folders?
For example:

Press button1 -> GlobalCEFApp.cache := 'C:\Cache\1\'; -> Chromium1.LoadURL(url);
Press button2 -> GlobalCEFApp.cache := 'C:\Cache\2\'; -> Chromium1.LoadURL(url);

In the cef3 , you could CookieManager.SetStoragePath(CookiesPath); But in the dcef4, it doesn't work that way...
User avatar
salvadordf
Posts: 4016
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Different cache directories id dcef4

Post by salvadordf »

Hi,

The SetStoragePath function was removed from the CEF API.

You need to use a new request context for new browsers. Each new request context is independent from the rest and you can use a different cache directory.

See the MDIBrowser demo for all the details.
Post Reply