Floyd Resler wrote:
We just got a client whose requirement is that user sessions expire after 30 
minutes of inactivity.  Our other clients are happy with not having their 
sessions expire during the work day (i.e. life is 8 hours).  I am using a MySQL 
database to store the session data.  My thought is to adjust the session 
expiration in the table based on the client currently logged in.  Is this a 
good approach or would there be better ways to do it?  And just to clarify: all 
clients use the same Web site.

It may be worth storing sessions in something like redis [1] instead, which let's you expire data [2] after a given time, then you can configure however you want easily.

The other benefit is that sessions will be extremely fast given that they'll all be stored in ram :)

[1] http://code.google.com/p/redis/
[2] http://code.google.com/p/redis/wiki/ExpireCommand

Best,

Nathan

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to