From 71da5d403c21f7e6ea208327e1ce627708950875 Mon Sep 17 00:00:00 2001 From: Jens Vagelpohl Date: Fri, 21 Aug 2020 10:48:44 +0200 Subject: [PATCH] Better session documentation and link (#885) * Better session documentation and link Update seasoning documentation hint and link the chapter on sessions * - clean up and expand Co-authored-by: Jens Vagelpohl --- docs/zope4/migration/removed.rst | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/docs/zope4/migration/removed.rst b/docs/zope4/migration/removed.rst index f6b4ea3cf5..d84c11e274 100644 --- a/docs/zope4/migration/removed.rst +++ b/docs/zope4/migration/removed.rst @@ -24,19 +24,35 @@ its ``eggs`` attribute and also add the flag ``wsgi = off``. Sessioning ---------- If you have used (or want to use) the built-in support for sessioning, add the -egg ``Products.Sessions`` to your application buildout. +egg ``Products.Sessions`` to your application buildout, which provides the +basic infrastructure without the actual session data storage. -You also need to make sure that your Zope configuration file contains a ZODB +For non-production environments you can use the old +``Products.TemporaryFolder`` temporary folder solution for storing session +data. But this implementation is known to randomly lose session data, so do not +use it in production. Add the package ``Products.TemporaryFolder`` to your +application buildout and make sure your Zope configuration file contains a ZODB configuration for a temporary folder like this:: - + name Temporary database (for sessions) - + mount-point /temp_folder container-class Products.TemporaryFolder.TemporaryContainer +If sessions are used very sparingly you can even get away with just adding a +Folder object named ``temp_folder`` at the root of the ZODB and restarting +Zope so the necessary ZODB objects for session support are created. This will +not lose session data, but it has a high risk of producing ZODB conflict errors +when storing data unless the session is used very carefully to minimize write +activity. + +For production deployments see, see `the Zope book chapter on sessioning +for alternative session storage options +`_. + External Methods ----------------