[Zope] session invalidate

p.t. p.training@tin.it
Wed, 30 Oct 2002 21:14:33 +0100


I would like somebody helps me to undestand what does exactly "session 
invalidate" mean.
TIA,
         p.t.

I've tryied the DTML code example reported at the end, and I've got this 
result:

The result:

The 'data' name now refers to a new or existing session data object.

data: id: 10360077861432189970, token: 54001646A0iEAi2X9io, contents: []

Developers can manually invalidate a session data object. When a session 
data object is invalidated, it will be flushed from the system, and will 
not be returned by subsequent references to REQUEST.SESSION or 
getSessionData(). The invalidate() method of a session data object causes 
this to happen:

call invalidate

And now, checking again for data session:

The 'data' name now refers to an existing session data object or None if 
there was no existing browser id or session data object.

data: id: 10360078530598187012, token: 54001646A0iEAi2X9io, contents: []


the DTML code:

<pre>
<dtml-let data="session_data_manager.getSessionData()">
The 'data' name now refers to a new or existing session data object.

<b>data</b>: <dtml-var data>

Developers can manually invalidate a session data object.
When a session data object is invalidated,
it will be flushed from the system, and will not be returned
by subsequent references to REQUEST.SESSION or getSessionData().
The invalidate() method of a session data object causes this to happen:

call invalidate <dtml-call "data.invalidate()">
</dtml-let>

And now, checking again for data session:
<dtml-let data="session_data_manager.getSessionData(create=0)">
The 'data' name now refers to an existing session data object
or None if there was no existing browser id or session data object.

<b>data</b>: <dtml-var data>

</dtml-let>
</pre>