cson  Update of "cson_sessmgr_file"

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.


Artifact ID: 1ebca330ab75c1384138a5a699a8abb732d7d1ec
Page Name:cson_sessmgr_file
Date: 2011-05-09 17:58:45
Original User: stephan
Parent: 8ca49218aa7893f834bad3730ae2552a9da65614

ACHTUNG: THIS PAGE IS NOW MAINTAINED IN THE NEW WIKI: http://whiki.wanderinghorse.net/wikis/cson/?page=cson_sessmgr_file

See also: cson_session, cson_sessmgr_cpdo, cson_sessmgr_whio_ht, cson_sessmgr_whio_epfs

File-based cson_session Storage

The factory function cson_sessmgr_file() or the name "file" passed to cson_sessmgr_load() are used to instantiate a session manager for file-based storage. The second argument to either function is a cson_object which should have the following JSON structure:

   "dir": string (directory where to store session files),
   "prefix": string (filename prefix),
   "suffix": string (filename suffix (extension), including leading '.')

If any values are missing, or are not strings, then unspecified defaults are used (which are probably not best-suited to your application). If you don't want prefix/suffix information, set them to empty strings. If they are not set or set to a non-string value (e.g. null or an integer) then those values are ignored and default values are used.

As an example, if we use this configuration:

   "dir": "/tmp",
   "prefix": "cson-session-",
   "suffix": ".json"

Then the session files will be named /tmp/cson-session-SESSION_ID.json.