Page 1 of 1

About cache folder

Posted: Sun Jun 25, 2023 2:01 pm
by thefunkyjoint
In my application i have many cache folders, so the user can select the one he want to uses at the moment. This allows an interessant feature in which the user can log in with different accounts in websites and select the one he want to use at the moment, without the need to logout and login again.

Works great but each cache folder gets really big over time, sometimes more than 3gb. What the user really need is only the cookies to preserve login session.

So what files do i need to keep ? Can i delete other files that aren't needed to keep the user logged ?

Re: About cache folder

Posted: Sun Jun 25, 2023 2:48 pm
by salvadordf
Hi,

Instead of deleting files I would call TChromiumCore.ClearDataForOrigin like this :

Code: Select all

TChromiumCore.ClearDataForOrigin('*', TCefClearDataStorageTypes.cdstCacheStorage);
Try other TCefClearDataStorageTypes values if the cache is too big.

Re: About cache folder

Posted: Mon Jun 26, 2023 11:10 am
by thefunkyjoint
Thank you !

Re: About cache folder

Posted: Thu Jul 13, 2023 11:55 am
by dilfich
salvadordf wrote: Sun Jun 25, 2023 2:48 pm Hi,

Instead of deleting files I would call TChromiumCore.ClearDataForOrigin like this :

Code: Select all

TChromiumCore.ClearDataForOrigin('*', TCefClearDataStorageTypes.cdstCacheStorage);
Try other TCefClearDataStorageTypes values if the cache is too big.
Isn't that the same thing?
Chromium1.ClearCache;

Re: About cache folder

Posted: Thu Jul 13, 2023 1:11 pm
by salvadordf
In this case, yes. I forgot about ClearCache :P