The code here and uses phpcassa as the interface to thrift.
Sessions were given their own column family, with the row key defined as the site name. each column is a session id with the column data being the session data.
Works a treat. Each time PHP session_start() is called, the expiry on the column resets back to the original value. So, if the expiry is set to 1 hour, it's 1 hour after the last session_start() was invoked.
Is this the right way to do it? Good question....
No comments:
Post a Comment