Sessions in Plone 6

I need sessions for a project where we use a multi-step wizard.

Previously we used Products.Sessions. In the past it had a problem of randomly losing data which has been resolved and works fine. Since it is no longer in the core you need to add and configure Products.Session and Products.TemporaryFolder.
We also used Beaker with collective.beaker ( GitHub - collective/collective.beaker ) which also worked fine and supports different backends (we used memcache).

Does anyone use sessions recently and if so, is there something better that these two - and which one would you use?

You can use memcached to store those sessions and use Products.mcdutils (GitHub - dataflake/Products.mcdutils: Zope session implementation with Memcached backend) to configure that in Zope.

Products.mcdutils is even older than collective.beaker (2008 vs. 2009) but has seen a lot more development in the last years. Will try it.

We have it in production and it just works.

Products.mcdutils seems to work fine and requires not configuration via zope.conf. But - same as with collective.beaker - when I put multiple FileUploads (transformed to a dict with bytes, filename and content-type) in the session, these files more often than not got lost. I could not figure out how and why, I may investigate further at some point. So I switched back to Products.Session with Products.TemporaryFolder. That works fine and can hold as many uploaded files as I like.

1 Like