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.

About cache folder

Post Reply
thefunkyjoint
Posts: 460
Joined: Thu Aug 10, 2017 12:40 pm

About cache folder

Post 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 ?
User avatar
salvadordf
Posts: 4056
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: About cache folder

Post 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.
thefunkyjoint
Posts: 460
Joined: Thu Aug 10, 2017 12:40 pm

Re: About cache folder

Post by thefunkyjoint »

Thank you !
dilfich
Posts: 330
Joined: Thu Nov 30, 2017 1:17 am

Re: About cache folder

Post 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;
User avatar
salvadordf
Posts: 4056
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: About cache folder

Post by salvadordf »

In this case, yes. I forgot about ClearCache :P
Post Reply