02-11-2022, 04:37 AM
A lot of stuff in IW does not appear to have any documentation, or I was unable to find it. Hence I keep running into small issues and need clarifications:
I'm creating lots of tmp files with TIWAppCache.AddFileToCache(self,... calls or similar, using ctSession flag, and then serve them to client on request.
I believe it creates a new session every time the link is refreshed - I can see it in my logs. Every refresh would send me different URL parameters, this is how it works attached to my target 3rd-party system in a frame. But I think it must be resetting something in the requests for me. Because if I keep reloading the page with different parameters in a browser manually, it only loads the 1st time and completely ignores it when the parameters change, returning the same 1st page, so it apparently remembers my session and I probably need to add code to reset it on getting new parameters. How/Where can I do this?
There's also a UserSession module and I can see from the logs that it creates user sessions. But UserSession object does not know its own session name/ID. Can I get it from WebAllpication or something?
In the file system I can see temp folders created and then user session subfolders created underneath those.
But all temp files are created in the root of the temp folders, not under user session subfolders - those stay empty for me. How can I control where the temp files go to? How do ctSession/ctForm, etc. work exactly?
What is the TIWServerController.SessionOptions.LockSessionTimeout for?
Can I explicitly close my session, i.e.: on service stopping, so that it cleans up the temp files for me?
I need all these details, because it's going to be handling zillions of files a day and it has to clean it up consistently, or it will quickly run out of disk space.
Is there some doc somewhere where it's all detailed in?
It's the latest IW, in http.sys service, BTW. Delphi 10.4.1.
I'm creating lots of tmp files with TIWAppCache.AddFileToCache(self,... calls or similar, using ctSession flag, and then serve them to client on request.
I believe it creates a new session every time the link is refreshed - I can see it in my logs. Every refresh would send me different URL parameters, this is how it works attached to my target 3rd-party system in a frame. But I think it must be resetting something in the requests for me. Because if I keep reloading the page with different parameters in a browser manually, it only loads the 1st time and completely ignores it when the parameters change, returning the same 1st page, so it apparently remembers my session and I probably need to add code to reset it on getting new parameters. How/Where can I do this?
There's also a UserSession module and I can see from the logs that it creates user sessions. But UserSession object does not know its own session name/ID. Can I get it from WebAllpication or something?
In the file system I can see temp folders created and then user session subfolders created underneath those.
But all temp files are created in the root of the temp folders, not under user session subfolders - those stay empty for me. How can I control where the temp files go to? How do ctSession/ctForm, etc. work exactly?
What is the TIWServerController.SessionOptions.LockSessionTimeout for?
Can I explicitly close my session, i.e.: on service stopping, so that it cleans up the temp files for me?
I need all these details, because it's going to be handling zillions of files a day and it has to clean it up consistently, or it will quickly run out of disk space.
Is there some doc somewhere where it's all detailed in?
It's the latest IW, in http.sys service, BTW. Delphi 10.4.1.

