Doubts regarding Server side session using caching or cookie based sessions Doubts regarding Server side session using caching or cookie based sessions flask flask

Doubts regarding Server side session using caching or cookie based sessions


Most browsers support cookies of up to 4096 bytes. (Source)

If you want to save more than this than you should use a server-side session backend like Redis or Memcache. It's very easy to replace the default cookie session interface of Flask with a Redis or Memcache interface. There is a great snippet for redis by Armin. If you prefere memcache than you can replace the redis stuff of the snippet with the same memcache methods. ;)