How to destroy a session in the proper way

Hi All,

i use a commend “session[‘user’] = nil” to destroy the session when the
user log out from the system.

bt even though i destroy the session i can see all the temporary files
that was created in my temp folder. so now i have a dought if i use my
system to run in the actual envirnment my temp folder will fill with all
the session temporary files.

so pls any one can tell how to get rid of this problem and is this the
way to destroy sessions.

Thanks
Nadeesha

if you use session[‘user’] = nil then it will only remove the session
for the user session variable.

instead of that put reset_session and it will remove every session
information

On Dec 7, 11:13 am, Nadeesha M. <rails-mailing-l…@andreas-

and yes use active record session then your tmp/session folder will be
empty.

On Dec 7, 11:13 am, Nadeesha M. <rails-mailing-l…@andreas-

nas wrote:

and yes use active record session then your tmp/session folder will be
empty.

On Dec 7, 11:13 am, Nadeesha M. <rails-mailing-l…@andreas-

hi nas,

tried ur session reset_session code it also working. bt still have the
problem like the temp session file dose not get deleted.

also i did not got what is this use active record session thing is.
pls need some advice

Thanks
Nad

On 08 Dec 2007, at 11:30, Frederick C. wrote:

and yes use active record session then your tmp/session folder
will be
empty.

The folder will be empty but you’ll have a growing sessions table.
Either way you need a cronjob (or pick your favourite mechanism for
scheduling scripts to run) that deletes sessions a some regular
interval.

… or you can just call a cleanup method at the login page depending
on the amount of traffic your site gets, works just as well.

Best regards

Peter De Berdt

On Dec 8, 6:46 am, Nadeesha M. <rails-mailing-l…@andreas-
s.net> wrote:

nas wrote:

and yes use active record session then your tmp/session folder will be
empty.

The folder will be empty but you’ll have a growing sessions table.
Either way you need a cronjob (or pick your favourite mechanism for
scheduling scripts to run) that deletes sessions a some regular
interval.

Fred

Peter De Berdt wrote:

On 08 Dec 2007, at 11:30, Frederick C. wrote:

and yes use active record session then your tmp/session folder
will be
empty.

The folder will be empty but you’ll have a growing sessions table.
Either way you need a cronjob (or pick your favourite mechanism for
scheduling scripts to run) that deletes sessions a some regular
interval.

… or you can just call a cleanup method at the login page depending
on the amount of traffic your site gets, works just as well.

Best regards

Peter De Berdt

ok thanks a lot Pals