| 101 | | <section> <!-- _cpSessionList section --> |
|---|
| 102 | | <title>_cpSessionsList</title> |
|---|
| 103 | | <para> |
|---|
| 104 | | Named sessions are created by placing an entry into _cpSessionsList. |
|---|
| 105 | | _cpSessionsList is a special class attribute containing a list of |
|---|
| 106 | | sessions defined for that particular class. |
|---|
| 107 | | </para> |
|---|
| | 103 | <section> <!-- session configuration --> |
|---|
| | 104 | <title>Session Configuration</title> |
|---|
| | 105 | <itemizedlist> |
|---|
| | 106 | <listitem> |
|---|
| | 107 | <section> |
|---|
| | 108 | <title>sessionFilter.on</title> |
|---|
| | 109 | <para> |
|---|
| | 110 | Can be True or False. Will toggle on/off all sessions within the current path. |
|---|
| | 111 | By default the session filter is turned off. |
|---|
| | 112 | </para> |
|---|
| | 113 | </section> |
|---|
| | 114 | </listitem> |
|---|
| | 115 | |
|---|
| | 116 | <listitem> |
|---|
| | 117 | <section> |
|---|
| | 118 | <title>sessionFilter.sessionList</title> |
|---|
| | 119 | <para> |
|---|
| | 120 | The sessionsList is the most important configuration setting for the session filter. |
|---|
| | 121 | The sessionsList is a python list containing an entry for every named session. |
|---|
| | 122 | Careless changes to the sessionsList are likely to break the application, so the |
|---|
| | 123 | sessionsList should only be modified from within application code, and not from |
|---|
| | 124 | the configuration file. |
|---|
| | 125 | </para> |
|---|
| | 126 | </section> |
|---|
| | 127 | </listitem> |
|---|
| | 128 | </itemizedlist> |
|---|
| | 129 | |
|---|
| | 130 | <para> |
|---|
| | 131 | These settings are common to all storage types. |
|---|
| | 132 | </para> |
|---|
| | 133 | |
|---|
| | 134 | <itemizedlist> |
|---|
| | 135 | <listitem> |
|---|
| | 136 | <section> |
|---|
| | 137 | <title>sessionFilter.sessionName.on</title> |
|---|
| | 138 | <para> |
|---|
| | 139 | Can be True or False. Will toggle on/off a specific named session. The setting |
|---|
| | 140 | only affects individual sessions, the sessionfilter must still be turned on using |
|---|
| | 141 | sessionFilter.on. |
|---|
| | 142 | </para> |
|---|
| | 143 | </section> |
|---|
| | 144 | </listitem> |
|---|
| | 145 | |
|---|
| | 146 | <listitem> |
|---|
| | 147 | <section> |
|---|
| | 148 | <title>sessionFilter.sessionName.storageType</title> |
|---|
| | 149 | <para> |
|---|
| | 150 | The storagType is the string name of the storage type for sessionName. |
|---|
| | 151 | The built in storageType are: 'ram', 'file', 'anydb', 'sqlobject'. If the |
|---|
| | 152 | storageType does not match one of the built in storage adaptors a special attribute |
|---|
| | 153 | look up is performed. If ommited the storageType will default to 'ram'. |
|---|
| | 154 | </para> |
|---|
| | 155 | </section> |
|---|
| | 156 | </listitem> |
|---|
| | 157 | |
|---|
| | 158 | <listitem> |
|---|
| | 159 | <section> |
|---|
| | 160 | <title>sessionFilter.sessionName.timeout</title> |
|---|
| | 161 | <para> |
|---|
| | 162 | The number of minutes of inactivity before an individual session can be removed. |
|---|
| | 163 | </para> |
|---|
| | 164 | </section> |
|---|
| | 165 | </listitem> |
|---|
| | 166 | |
|---|
| | 167 | <listitem> |
|---|
| | 168 | <section> |
|---|
| | 169 | <title>sessionFilter.sessionName.cleanUpDelay</title> |
|---|
| | 170 | <para> |
|---|
| | 171 | The number of minutes to wait before cleaning up old sessions. |
|---|
| | 172 | </para> |
|---|
| | 173 | </section> |
|---|
| | 174 | </listitem> |
|---|
| | 175 | |
|---|
| | 176 | <listitem> |
|---|
| | 177 | <section> |
|---|
| | 178 | <title>sessionFilter.sessionName.cookiePrefix</title> |
|---|
| | 179 | <para> |
|---|
| | 180 | The cookiePrefix is prepended to the beginning of every session cookie name. |
|---|
| | 181 | </para> |
|---|
| | 182 | </section> |
|---|
| | 183 | </listitem> |
|---|
| | 184 | |
|---|
| | 185 | </itemizedlist> |
|---|
| 159 | | With relational database drivers, all data is stored in a relational database table. Due to the nature of |
|---|
| 160 | | relational databases, there are several restrictions on how data can be stored. Each session |
|---|
| 161 | | is stored as a single row in the session table. The session table must be created with a column |
|---|
| 162 | | for each variable needed by the application. This makes it impossible to store arbitrary key/value pairs, |
|---|
| 163 | | as can be done using several of the other storage drivers. In addition, relational databases also place |
|---|
| 164 | | restrictions on the type of data that can be stored in each column. Attempting to store the wrong |
|---|
| 165 | | type of data in a session variable will result in an error. |
|---|
| 166 | | </para> |
|---|
| 167 | | |
|---|
| 168 | | <para> |
|---|
| 169 | | Despite these restrictions, storing session data in relational database has many advantages. |
|---|
| 170 | | This approach allows session data to be integrated into an existing relational database, which |
|---|
| 171 | | dynamic web applications often use anyway. This approach allows for a level of scalability not possible |
|---|
| 172 | | with other storage drivers. In addition, by using a networked database server, session data can be easily |
|---|
| 173 | | shared between a cluster of web servers. |
|---|
| | 245 | With relational database drivers, all data is stored in a relational |
|---|
| | 246 | database table. Due to the nature of relational databases, there are several |
|---|
| | 247 | restrictions on how data can be stored. Each session is stored as a single |
|---|
| | 248 | row in the session table. The session table must be created with a column for |
|---|
| | 249 | each variable needed by the application. This makes it impossible to store arbitrary |
|---|
| | 250 | key/value pairs, as can be done using several of the other storage drivers. |
|---|
| | 251 | In addition, relational databases also place restrictions on the type of data |
|---|
| | 252 | that can be stored in each column. Attempting to store the wrong type of data |
|---|
| | 253 | in a session variable will result in an error. |
|---|
| | 254 | </para> |
|---|
| | 255 | |
|---|
| | 256 | <para> |
|---|
| | 257 | Despite these restrictions, storing session data in relational database has many |
|---|
| | 258 | advantages. This approach allows session data to be integrated into an existing |
|---|
| | 259 | relational database, which dynamic web applications often use anyway. This approach |
|---|
| | 260 | allows for a level of scalability not possible with other storage drivers. In addition, |
|---|
| | 261 | by using a networked database server, session data can be easily shared between a |
|---|
| | 262 | cluster of web servers. |
|---|