Welcome Guest, Not a member yet? Register   Sign In
Poll: Do you destroy old sessions when the session is regenerated?
You do not have permission to vote in this poll.
Yes
0%
0 0%
No
100.00%
1 100.00%
Total 1 vote(s) 100%
* You voted for this item. [Show Results]

Any good reason to not destroy old sessions when they are regenerated?
#1

I've always felt that there was no good reason to keep old sessions around when they get regenerated, but wanted to ask what other people think about this issue. What do you do with old sessions? What can you do with old sessions? If you're not destroying them when they are regenerated, why not?
Reply
#2

If you don't want logouts during asynchronous AJAX requests, you can't destroy on regeneration, because race conditions.
Reply
#3

(01-15-2016, 03:25 PM)Narf Wrote: If you don't want logouts during asynchronous AJAX requests, you can't destroy on regeneration, because race conditions.

I'm always doing asynchronous AJAX requests, because that's the jQuery default. I'd have to do some testing to see if I have problems, but haven't noticed any. Good to know about that issue though. I know it's probably documented.

The race conditions you speak of, is that only when you have many multiple AJAX requests?
Reply
#4

They're pretty much guaranteed ... Maybe not obvious at first, but they will happen.

It's pretty simple - one request destroys the session that another is just attempting to use.
Reply
#5

(01-15-2016, 04:24 PM)Narf Wrote: They're pretty much guaranteed ... Maybe not obvious at first, but they will happen.

It's pretty simple - one request destroys the session that another is just attempting to use.

I understand. I'm just sitting here playing with ajax requests, with my sess_time_to_update set at 3 seconds, and can't make it happen. I think I'll put a bunch of ajax requests in a loop and see what happens.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB