Thread CGI::Session - Wie löscht man expired sessions?? (8 answers)
Opened by jan10001 at 2003-12-14 13:16

jan10001
 2003-12-14 13:16
#497 #497
User since
2003-08-14
962 Artikel
BenutzerIn
[default_avatar]
Ich denke das dürfte die Antwort sein.

Quote
expire()
expire($time)
expire($param, $time)

Sets expiration date relative to atime(). If used with no arguments, returns the expiration date if it was ever set. If no expiration was ever set, returns undef.

Second form sets an expiration time. This value is checked when previously stored session is asked to be retrieved, and if its expiration date has passed will be expunged from the disk immediately and new session is created accordingly. Passing 0 would cancel expiration date.

By using the third syntax you can also set an expiration date for a particular session parameter, say "~logged-in". This would cause the library call clear() on the parameter when its time is up.

View full thread CGI::Session - Wie löscht man expired sessions??