Save state data to disk and return an id
ns_state_save stores the specified ns_set (set) and returns the state's id. To create a new set of state data, omit the id argument. A new state will be created, and the id for it will be returned. To save state data to an existing set, specify the its state id in the id argument.
State data is stored in the servers/
server-name/modules/tclstate
directory. See the "Maintaining State" section for configuration information.