I try to implement a voting system. It works like this. If a user votes a post I record its temporary state in a session variable: upvoted, starred etc..
If current user
No, it's not possible. The request is over, the session in that thread is essentially a read-only copy. Writing to it won't do anything because there's no response to carry the updated cookie to the browser.
It would make more sense to store the timestamp in the temporary table when you store the temporary vote, rather than trying to do something with threads and the session.