Welcome Guest Search | Active Topics | Sign In | Register

CachePath sometimes creating numbered folders Options
Bryan
Posted: Tuesday, May 14, 2024 9:13:01 PM
Rank: Newbie
Groups: Member

Joined: 5/10/2023
Posts: 2
We set the cache path for the browser engine using the CachePath property:
https://www.essentialobjects.com/doc/EO.WebEngine.EngineOptions.CachePath.html

The CachePath we set looks something like this:
C:\Users\<username>\AppData\Roaming\<productname>\Browser

In general, this works. However, sometimes the cache path appends a number to the folder name and (over time) we end up with folder names like this:

Browser
Browser_1
Browser_2
Browser_3

Can you please explain what conditions would cause these additional cache paths ("_1", "_2", "_3", etc) to be automatically created?

Thank you!


eo_support
Posted: Tuesday, May 14, 2024 10:33:34 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,133
Hi,

Each Engine instance must have its own cache path. So when you have multiple Engine instances running on the same machine but their CachePath are all set to the same path, you will see numbers being added to the cache path so that each Engine instance will have their own cache path.

The most common scenario when you have multiple Engine instances is when you run multiple instances of the same application. In this case each instance of the application would create a default Engine instance. You can also explicitly create additional Engine instance in your application. In that case one instance of your application will have multiple Engine instances.

Hope this clears up. Please feel free to let us know if you still have any more questions.

Thanks!
Bryan
Posted: Friday, May 24, 2024 11:52:19 AM
Rank: Newbie
Groups: Member

Joined: 5/10/2023
Posts: 2
Thank you for the reply and what you are stating make sense. This is likely the scenario we are facing but we are uncertain how it is occurring. We suspect the previous engine instances are not shutting down properly when our application terminates, but we've been unable to confirm this.

Follow-up question: How does the browser engine determine if there are already other engine instances running on the same machine (and thus creates its own unique CachePath folder)?

FYI, if it matters, we use InitWorkerProcessExecutable to set the path of the worker process to something like this:
C:\Users\<username>\AppData\Roaming\<productname>\Executable\<productname>.exe
eo_support
Posted: Friday, May 24, 2024 4:16:00 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,133
Hi,

Each engine has its own process. That process would place a lock on the folder it uses so no other process (engine) will be able to access it. Once the owner engine process exits, the lock is released and the folder will then be accessible to another engine process.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.