[flask] does flask session have the maximum size?
- From:
- Eunjin Lee
- Date:
- 2010-08-08 @ 15:13
Hi all,
I wrote some codes briefly, like below:
---
class Object(object):
pass
item = Object()
item.number = 123
item.name = 'blah blah blah'
...
item.description = 'blah blah blah blah blah blah ... '
session['bag'].append(item)
--
then, I couldn't append in bag more than 5 items and
I can append one more item in bag as reducing item's description.
Can anyone help me?
Thanks.
Regards,
Eunjin Lee
Re: [flask] does flask session have the maximum size?
- From:
- Armin Ronacher
- Date:
- 2010-08-09 @ 09:40
Hi,
If you want large data in there switch to filesystem based sessions by
hooking in the FileSystemSession stuff from werkzeug.contrib.sessions or
store the cart_id (an integer for a table) in the database and set a
separate timeout for the cart and delete it with a cronjob.
Regards,
Armin
Re: [flask] does flask session have the maximum size?
- From:
- Daniel \"DasIch\"
- Date:
- 2010-08-08 @ 15:24
The session data is stored in a cookie so you are limited when it comes
to the amount of data you can store.
Re: [flask] does flask session have the maximum size?
- From:
- Eunjin Lee
- Date:
- 2010-08-09 @ 03:29
Thank you, Daniel.
I guess that sessions have more large amount of data limitation that cookies.
I found this : http://goo.gl/BFzG
I'm re-writting a e-commerce system that was written in php and It has
a session based cart for non-logined users.
In php, I couldn't meet the limitation of session storage.
2010/8/9 Daniel "DasIch" <dasdasich@googlemail.com>:
> The session data is stored in a cookie so you are limited when it comes
> to the amount of data you can store.
>
>