Skip to content

Commit

Permalink
Better session documentation and link (#885)
Browse files Browse the repository at this point in the history
* Better session documentation and link

Update seasoning documentation hint and link the chapter on sessions

* - clean up and expand

Co-authored-by: Jens Vagelpohl <jens@netz.ooo>
  • Loading branch information
dwt and dataflake committed Aug 21, 2020
1 parent 7e9d4f7 commit a4d255c
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions docs/migrations/zope4/removed.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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::

<zodb_db temporary>
<temporarystorage>
<mappingstorage>
name Temporary database (for sessions)
</temporarystorage>
</mappingstorage>
mount-point /temp_folder
container-class Products.TemporaryFolder.TemporaryContainer
</zodb_db>

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
<https://zope.readthedocs.io/en/latest/zopebook/Sessions.html#alternative-server-side-session-backends-for-zope-4>`_.


External Methods
----------------
Expand Down

0 comments on commit a4d255c

Please sign in to comment.