Internet Direct (Indy) Version 9.0.1 Beta
TIdHTTPDefaultSessionList.PurgeStaleSessions
Removes one or more expired sessions from the session list.

procedure PurgeStaleSessions(PurgeAll: Boolean); override;
Parameters
PurgeAll: Boolean = false
Clear one or all stale sessions. Default value is False.

Description
PurgeStaleSessions is a procedure used to remove persistent HTTP sessions where the last access timestamp and session timeout properties indicate that the session has expired. PurgeStaleSessions can be used to remove one or more session that have expired, as indicated in the PurgeAll argument.

PurgeStaleSessions will iteratively call RemoveSessionFromLockedList to remove the expired session(s). PurgeStaleSessions insures that the internal thread list is locked prior to removing stale sessions, and is unlocked prior to exiting from the method.