Welcome Guest, Not a member yet? Register   Sign In
CI 3 RC Sessions: mark_as_temp()
#5

I just stumbled upon this article about "Remember Me" yesterday: https://resonantcore.net/blog/2015/02/re...strategies

As for expiring a session after one hour or on browser close ... you can't have both. Being very careful with your settings, you can force the garbage collector to erase sessions that haven't been modified within the past hour, while otherwise having sess_expiration set to 0 (which means expire on browser close), but GC is still run by chance.

Just set the expiration to one hour - if the user is active, they'll extend that period; and if not - on browser close still means "until GC runs and clears inactive sessions". You can't do anything better than that.
Reply


Messages In This Thread
CI 3 RC Sessions: mark_as_temp() - by summer - 02-02-2015, 12:36 AM
RE: CI 3 RC Sessions: mark_as_temp() - by summer - 02-02-2015, 01:11 PM
RE: CI 3 RC Sessions: mark_as_temp() - by Narf - 02-02-2015, 02:23 PM
RE: CI 3 RC Sessions: mark_as_temp() - by summer - 02-03-2015, 12:00 AM
RE: CI 3 RC Sessions: mark_as_temp() - by Narf - 02-03-2015, 02:08 AM
RE: CI 3 RC Sessions: mark_as_temp() - by summer - 02-03-2015, 03:35 AM
RE: CI 3 RC Sessions: mark_as_temp() - by Narf - 02-03-2015, 03:48 AM
RE: CI 3 RC Sessions: mark_as_temp() - by summer - 02-03-2015, 04:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB