Skip to content

Commit

Permalink
Describe upgrade process for serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
Lxstr committed Mar 17, 2024
1 parent c9eeb9a commit d4dda9f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/config_serialization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ Serialization

From 0.7.0 the serializer is msgspec, which is configurable using ``SESSION_SERIALIZATION_FORMAT``. The default format is ``'msgpack'`` which has 30% storage reduction compared to ``'json'``. The ``'json'`` format may be helpful for debugging, easier viewing or compatibility. Switching between the two should be seamless, even for existing sessions.

All sessions that are accessed or modified while using 0.7.0 will convert to a msgspec format. Once using 1.0.0, any sessions that are still in pickle format will be cleared upon access.

The msgspec library has speed and memory advantages over other libraries. However, if you want to use a different library (such as pickle or orjson), you can override the :attr:`session_interface.serializer`.

0 comments on commit d4dda9f

Please sign in to comment.