Is the preferred method of storing "session" data using Tornado via secure_cookie?

For example, I log in to the server. I want to store things like username. Best would be:

self.set_secure_cookie('username', "foobar70") 
+4
source share
1 answer

Just my opponent. Secure cookies usually do a good job of storing data safely and work fine if you need to store small chunks of data, but transferring a lot of data back and forth with large cookies is annoying :) So the answer depends on your data volume.

I usually use this implementation of sessions in Tornado, based on redis https://gist.github.com/1735032

+2
source

All Articles