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.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

Cahe

Post Reply
User avatar
salvadordf
Posts: 4565
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Cahe

Post by salvadordf »

Hi,

If you have a normal browser created at the same time than the rest of the application components then you can set the cache using the GlobalCEFApp.cache property before the GlobalCEFApp.StartMainProcess call in the DPR file. The following link has the code to set the cache disabled. Enable it in your application :
https://github.com/salvadordf/CEF4Delph ... r2.dpr#L69

If you create the browser at run-time you can also set the cache while creating a new "request context". You would need to set the cache in the first parameter of TCefRequestContextRef.New :
https://github.com/salvadordf/CEF4Delph ... m.pas#L212

In all cases, the cache directory can be a relative or absolute path, and it has to be located in a writable directory.
User avatar
salvadordf
Posts: 4565
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Cahe

Post by salvadordf »

Kazann116 wrote: Wed Jan 30, 2019 8:29 am I tried to do as in this example, but I didn’t figure out how to do it, if it’s not difficult for you to help, I will pay you.
I'm sorry but I'm too busy.
Kazann116 wrote: Wed Jan 30, 2019 8:32 am and another question, when you compile a project, the files are created in the main folder, how can these files be transferred to another folder
You need to set the output directory in the project settings. All CEF4Delphi demos use that setting to create the EXE inside the BIN directory but some Delphi versions have problems reading that setting from Delphi 10.3 project files.
Post Reply