sessions
sessions copied to clipboard
Deleting session from the redis db!
Is there a way to delete the session of the user after it's no longer needed? I've tried session.Clear(), but it still leaves the session id in the database. Could this be fixed?
have you call session.Save() after Clear()?
No, I haven't so far, but doesn't seem to dial the database. Also I've notice that the session data isn't kept in the database, it only stores the session id without any data..
post your code here
I can't right now. Also, if the session data is not gonna be kept in the database, why isn't c.Keys used to store data?? This package is based on gorilla context which should be replaced with request.Context or c.Keys for saving the data...
Hi,
Seems old but @unreadable were you able to fix this issue? I don't see a method to delete the session key stored on Redis.
Even though the session.Delete() & session.clear() does invalidating the session but there needs to be a cleaner way to remove the session key from redis itself?
Thanks, Shaurya