Loads the session if available, and creates one if not. May write a session id cookie to the passed cgi object.
Clears the session data from both memory and disk. The session id is not changed by this function. To change it, use invalidate() if you want to clear data and change the ID or regenerateId() if you want to change the session ID, but not change the data.
Commits your changes back to disk.
like opIn
Kill the current session. It wipes out the disk file and memory, and changes the session ID.
Creates a new cookie, session id, and csrf token, deleting the old disk data. If you call commit() after doing this, it will save your existing data back to disk. (If you don't commit, the data will be lost when this object is deleted.)
Discards your changes, reloading the session data from the disk file.
get/set for strings
Call this periodically to clean up old session files. The finalizer param can cancel the deletion of a file by returning false.
Provides some persistent storage, kinda like PHP But, you have to manually commit() the data back to a file. You might want to put this in a scope(exit) block or something like that.